Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/scoped-holder.hpp"
Extension to std::unique_ptr, allowing copy operations on empty pointers (i.e.
contained pointer is null).
error::Logic | on attempt to copy otherwise |
Definition at line 67 of file scoped-holder.hpp.
Public Member Functions | |
template<class SU > | |
ScopedPtrHolder (SU *p) | |
template<class SU > | |
ScopedPtrHolder (std::unique_ptr< SU > pu) | |
ScopedPtrHolder (ScopedPtrHolder const &ref) | |
ScopedPtrHolder & | operator= (ScopedPtrHolder const &ref) |
Friends | |
void | transfer_control (ScopedPtrHolder &from, ScopedPtrHolder &to) |
Private Types | |
typedef std::unique_ptr< B > | _Parent |
Static Private Member Functions | |
static B * | must_be_null (_Parent const &ptr) |