mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-09 02:26:06 -05:00
29 lines
617 B
C++
29 lines
617 B
C++
|
#ifndef PIMPL_IMPL_HPP_
|
||
|
#define PIMPL_IMPL_HPP_
|
||
|
|
||
|
#include <utility>
|
||
|
|
||
|
template<typename T>
|
||
|
pimpl<T>::pimpl () : m_ {new T {}} {}
|
||
|
|
||
|
template<typename T>
|
||
|
template<typename ...Args>
|
||
|
pimpl<T>::pimpl (Args&& ...args) : m_ {new T {std::forward<Args> (args)...} } {}
|
||
|
|
||
|
template<typename T>
|
||
|
pimpl<T>::~pimpl () {}
|
||
|
|
||
|
template<typename T>
|
||
|
T * pimpl<T>::operator -> () {return m_.get ();}
|
||
|
|
||
|
template<typename T>
|
||
|
T const * pimpl<T>::operator -> () const {return m_.get ();}
|
||
|
|
||
|
template<typename T>
|
||
|
T& pimpl<T>::operator * () {return *m_.get ();}
|
||
|
|
||
|
template<typename T>
|
||
|
T const& pimpl<T>::operator * () const {return *m_.get ();}
|
||
|
|
||
|
#endif
|