#ifndef H_CELERO_PIMPLIMPL_H #define H_CELERO_PIMPLIMPL_H /// /// \author John Farrier /// /// \copyright Copyright 2015, 2016, 2017, 2018. 2019 John Farrier /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// #include #include namespace celero { template Pimpl::Pimpl() : _pimpl(new T()) { } template template Pimpl::Pimpl(Arg1&& arg1) : _pimpl(new T(std::forward(arg1))) { } template template Pimpl::Pimpl(Arg1&& arg1, Arg2&& arg2) : _pimpl(new T(std::forward(arg1), std::forward(arg2))) { } template template Pimpl::Pimpl(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3) : _pimpl(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3))) { } template template Pimpl::Pimpl(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4) : _pimpl(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4))) { } template template Pimpl::Pimpl(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5) : _pimpl( new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5))) { } template template Pimpl::Pimpl(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5, Arg6&& arg6) : _pimpl(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5), std::forward(arg6))) { } template Pimpl::~Pimpl() { } template T* Pimpl::operator->() { return _pimpl.get(); } template const T* Pimpl::operator->() const { return _pimpl.get(); } template T& Pimpl::operator*() { return *_pimpl.get(); } } #endif