|
Nugget
|
#include <unique_ptr.h>

Public Types | |
| typedef Deleter | deleter_type |
| typedef T | element_type |
| typedef unique_ptr< element_type[], deleter_type > | this_type |
| typedef Internal::unique_pointer_type< element_type, deleter_type >::type | pointer |
Public Member Functions | |
| EA_CPP14_CONSTEXPR | unique_ptr (std::nullptr_t) EA_NOEXCEPT |
| template<typename P , typename = eastl::enable_if_t<Internal::is_array_cv_convertible<P, pointer>::value>> | |
| unique_ptr (P pArray) EA_NOEXCEPT | |
| template<typename P > | |
| unique_ptr (P pArray, typename eastl::conditional< eastl::is_lvalue_reference< deleter_type >::value, deleter_type, typename eastl::add_lvalue_reference< const deleter_type >::type >::type deleter, typename eastl::enable_if< Internal::is_array_cv_convertible< P, pointer >::value >::type *=0) EA_NOEXCEPT | |
| template<typename P > | |
| unique_ptr (P pArray, typename eastl::remove_reference< deleter_type >::type &&deleter, eastl::enable_if_t< Internal::is_array_cv_convertible< P, pointer >::value > *=0) EA_NOEXCEPT | |
| unique_ptr (this_type &&x) EA_NOEXCEPT | |
| template<typename U , typename E > | |
| unique_ptr (unique_ptr< U, E > &&u, typename enable_if< Internal::is_safe_array_conversion< T, pointer, U, typename unique_ptr< U, E >::pointer >::value &&eastl::is_convertible< E, deleter_type >::value &&(!eastl::is_lvalue_reference< deleter_type >::value||eastl::is_same< E, deleter_type >::value)>::type *=0) EA_NOEXCEPT | |
| this_type & | operator= (this_type &&x) EA_NOEXCEPT |
| template<typename U , typename E > | |
| enable_if< Internal::is_safe_array_conversion< T, pointer, U, typename unique_ptr< U, E >::pointer >::value &&is_assignable< deleter_type &, E && >::value, this_type & >::type | operator= (unique_ptr< U, E > &&u) EA_NOEXCEPT |
| this_type & | operator= (std::nullptr_t) EA_NOEXCEPT |
| void | reset (pointer pArray=pointer()) EA_NOEXCEPT |
| pointer | release () EA_NOEXCEPT |
| pointer | detach () EA_NOEXCEPT |
| void | swap (this_type &x) EA_NOEXCEPT |
| add_lvalue_reference< T >::type | operator[] (ptrdiff_t i) const |
| pointer | get () const EA_NOEXCEPT |
| deleter_type & | get_deleter () EA_NOEXCEPT |
| const deleter_type & | get_deleter () const EA_NOEXCEPT |
| operator bool () const EA_NOEXCEPT | |
| unique_ptr (const this_type &)=delete | |
| These functions are deleted in order to prevent copying, for safety. | |
| unique_ptr & | operator= (const this_type &)=delete |
| unique_ptr & | operator= (pointer pArray)=delete |
Protected Attributes | |
| eastl::compressed_pair< pointer, deleter_type > | mPair |
unique_ptr specialization for unbounded arrays.
Differences from unique_ptr<T>:
It's not possible to create a unique_ptr for arrays of a known bound (e.g. int[4] as opposed to int[]).
Example usage: unique_ptr<int[]> ptr(new int[10]); ptr[4] = 4;
|
inline |
detach For backwards-compatibility with pre-C++11 code.
|
inline |
operator[] Returns a reference to the specified item in the owned pointer array. Example usage: unique_ptr<int> ptr(new int[6]); int x = ptr[2];