1 #ifndef CTL_COPYABLEUNIQUEPTR_H 2 #define CTL_COPYABLEUNIQUEPTR_H 20 using std::unique_ptr<T>::unique_ptr;
31 using std::unique_ptr<T>::get;
32 using std::unique_ptr<T>::get_deleter;
33 using std::unique_ptr<T>::release;
34 using std::unique_ptr<T>::reset;
35 using std::unique_ptr<T>::swap;
36 using std::unique_ptr<T>::operator bool;
37 using std::unique_ptr<T>::operator->;
38 using std::unique_ptr<T>::operator*;
41 bool isNull()
const noexcept;
42 std::unique_ptr<T>&
wrapped() noexcept;
43 const std::unique_ptr<T>&
wrapped()
const noexcept;
51 : std::unique_ptr<T>(std::move(uniquePtr))
61 : std::unique_ptr<T>(other ? static_cast<T*>(other->clone()) : nullptr)
73 this->reset(other ? static_cast<T*>(other->clone()) :
nullptr);
83 return *
this ==
nullptr;
106 #endif // CTL_COPYABLEUNIQUEPTR_H CopyableUniquePtr & operator=(const CopyableUniquePtr< T > &other)
Definition: copyableuniqueptr.h:71
std::unique_ptr< T > & wrapped() noexcept
Definition: copyableuniqueptr.h:90
Extends std::unique_ptr<T> with copy operations using the clone method of type T.
Definition: copyableuniqueptr.h:14
bool isNull() const noexcept
Definition: copyableuniqueptr.h:81