CsPointer
1.0.1
|
Contains a pointer to a dynamically allocated array. More...
Public Member Functions | |
CsUniqueArrayPointer (CsUniqueArrayPointer< ElementType > &&other) noexcept | |
CsUniqueArrayPointer & | operator= (CsUniqueArrayPointer< ElementType > &&other) noexcept |
CsUniqueArrayPointer (CsUniqueArrayPointer< ElementType[]> &&other) noexcept | |
CsUniqueArrayPointer & | operator= (CsUniqueArrayPointer< ElementType[]> &&other) noexcept |
ElementType & | operator[] (std::size_t index) const noexcept |
Public Member Functions inherited from CsPointer::CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > | |
CsUniquePointer (Pointer p=nullptr) noexcept | |
CsUniquePointer (Pointer p, Deleter d) noexcept | |
CsUniquePointer (std::unique_ptr< cs_add_missing_extent_t< T >, Deleter > &&p) noexcept | |
CsUniquePointer (CsUniquePointer &&other) = default | |
Pointer | data () const noexcept |
Pointer | get () const noexcept |
Deleter & | get_deleter () noexcept |
const Deleter & | get_deleter () const noexcept |
bool | is_null () const noexcept |
operator bool () const noexcept | |
operator std::unique_ptr< cs_add_missing_extent_t< T >, Deleter > () &&noexcept | |
bool | operator! () const noexcept |
ElementType & | operator* () const noexcept (noexcept (*std::declval< Pointer >())) |
Pointer | operator-> () const noexcept |
CsUniquePointer & | operator= (CsUniquePointer &&other) = default |
Pointer | release () noexcept |
void | reset (Pointer other=nullptr) noexcept |
void | swap (CsUniquePointer &other) noexcept |
Pointer | take () noexcept |
~CsUniquePointer () = default | |
Related Functions | |
These are not member functions | |
CsUniqueArrayPointer< T > | make_unique (std::size_t size) |
Related Functions inherited from CsPointer::CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > | |
CsUniquePointer< cs_add_missing_extent_t< T > > | make_unique (Args &&...args) |
bool | operator!= (const CsUniquePointer< T1, Deleter1 > &ptr1, const CsUniquePointer< T2, Deleter2 > &ptr2) |
bool | operator!= (const CsUniquePointer< T1, Deleter1 > &ptr1, const T2 *ptr2) |
bool | operator!= (const T1 *ptr1, const CsUniquePointer< T2, Deleter2 > &ptr2) |
bool | operator!= (const CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > &ptr1, std::nullptr_t) |
bool | operator!= (std::nullptr_t, const CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > &ptr2) |
bool | operator< (const CsUniquePointer< T1 > &ptr1, const CsUniquePointer< T2 > ptr2) |
bool | operator<= (const CsUniquePointer< T1 > &ptr1, const CsUniquePointer< T2 > ptr2) |
bool | operator== (const CsUniquePointer< T1, Deleter1 > &ptr1, const CsUniquePointer< T2, Deleter2 > &ptr2) |
bool | operator== (const CsUniquePointer< T1, Deleter1 > &ptr1, const T2 *ptr2) |
bool | operator== (const T1 *ptr1, const CsUniquePointer< T2, Deleter2 > &ptr2) |
bool | operator== (const CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > &ptr1, std::nullptr_t) |
bool | operator== (std::nullptr_t, const CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > &ptr2) |
bool | operator> (const CsUniquePointer< T1 > &ptr1, const CsUniquePointer< T2 > ptr2) |
bool | operator>= (const CsUniquePointer< T1 > &ptr1, const CsUniquePointer< T2 > ptr2) |
Additional Inherited Members | |
Public Typedefs inherited from CsPointer::CsUniquePointer< cs_add_missing_extent_t< T >, Deleter > | |
using | DeleterType = deleter_type |
using | ElementType = element_type |
using | Pointer = pointer |
using | deleter_type = typename std::unique_ptr< cs_add_missing_extent_t< T >, Deleter >::deleter_type |
using | element_type = typename std::unique_ptr< cs_add_missing_extent_t< T >, Deleter >::element_type |
using | pointer = typename std::unique_ptr< cs_add_missing_extent_t< T >, Deleter >::pointer |
The CsUniqueArrayPointer class contains a pointer to a dynamically allocated array of objects. This class inherits from CsUniquePointer and implements the operator[] method which returns a specific element in the array. When this class is destroyed the array it points to is also destroyed.
Refer to the CsUniquePointer documentation for inherited methods like get(), isNull, and release().
|
inlinenoexcept |
Move constructs a new CsUniqueArrayPointer from other.
|
inlinenoexcept |
Move constructs a new CsUniqueArrayPointer from other.
|
inlinenoexcept |
Move assigns from other and returns a reference to this object.
|
inlinenoexcept |
Move assigns from other and returns a reference to this object.
|
inlinenoexcept |
Returns a reference to the element located at the given index of the array. If this smart pointer is a nullptr then the behavior is undefined.
|
related |
Constructs a new array containing elements of type T. The number of elements in the array will be equal to the value for size. Each element will be value initialized.