Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer). More...
#include <boost/locale/hold_ptr.hpp>
Public Member Functions | |
| hold_ptr () | |
| hold_ptr (T *v) | |
| ~hold_ptr () | |
| T const * | get () const |
| T * | get () |
| T const & | operator* () const |
| T & | operator* () |
| T const * | operator-> () const |
| T * | operator-> () |
| T * | release () |
| void | reset (T *p=0) |
| void | swap (hold_ptr &other) |
| Swap two pointers. | |
a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer).
| boost::locale::hold_ptr< T >::hold_ptr | ( | ) | [inline] |
Create new empty pointer
| boost::locale::hold_ptr< T >::hold_ptr | ( | T * | v | ) | [inline, explicit] |
Create a pointer that holds v, ownership is transferred to smart pointer
| boost::locale::hold_ptr< T >::~hold_ptr | ( | ) | [inline] |
Destroy smart pointer and the object it owns.
| T const* boost::locale::hold_ptr< T >::get | ( | ) | const [inline] |
Get a const pointer to the object
| T* boost::locale::hold_ptr< T >::get | ( | ) | [inline] |
Get a mutable pointer to the object
| T& boost::locale::hold_ptr< T >::operator* | ( | ) | [inline] |
Get a mutable reference to the object
| T const& boost::locale::hold_ptr< T >::operator* | ( | ) | const [inline] |
Get a const reference to the object
| T const* boost::locale::hold_ptr< T >::operator-> | ( | ) | const [inline] |
Get a const pointer to the object
| T* boost::locale::hold_ptr< T >::operator-> | ( | ) | [inline] |
Get a mutable pointer to the object
| T* boost::locale::hold_ptr< T >::release | ( | ) | [inline] |
Transfer an ownership on the pointer to user
| void boost::locale::hold_ptr< T >::reset | ( | T * | p = 0 |
) | [inline] |
Set new value to pointer, previous object is destroyed, ownership on new object is transferred