Allocated Array. More...
#include <AllocatedArray.hpp>
Public Types | |
using | size_type = std::size_t |
Size type. | |
using | value_type = T |
Value type. | |
using | const_value_type = const value_type |
Constant value type. | |
using | reference = value_type & |
Reference type. | |
using | const_reference = const value_type & |
Constant reference type. | |
using | pointer = value_type * |
Pointer type. | |
using | const_pointer = const value_type * |
Constant pointer type. | |
using | difference_type = std::ptrdiff_t |
Difference type. | |
using | deleter_type = Deleter |
Deleter type. | |
using | iterator = pointer |
Iterator alias. | |
using | const_iterator = const_pointer |
Constant iterator alias. | |
Public Member Functions | |
constexpr | AllocatedArray (size_type max_size, pointer data, deleter_type deleter=noop_deleter) |
Initializing constructor. | |
~AllocatedArray () noexcept | |
Destructor. | |
AllocatedArray (const AllocatedArray ©)=delete | |
AllocatedArray (AllocatedArray &&other) noexcept | |
Move constructor. | |
size_type | size () const noexcept |
Gets the current size of this array. | |
size_type | max_size () const noexcept |
Gets the maximum size this array can possibly get to. | |
bool | empty () const noexcept |
Determines whether this array is empty. | |
pointer | data () const noexcept |
Gets a direct pointer to this array's memory. | |
reference | operator[] (size_type i) |
Indexed operator. | |
const_reference | operator[] (size_type i) const |
Indexed operator. | |
iterator | begin () |
Gets the "begin" iterator value for this array. | |
iterator | end () |
Gets the "end" iterator value for this array. | |
const_iterator | begin () const |
Gets the "begin" iterator value for this array. | |
const_iterator | end () const |
Gets the "end" iterator value for this array. | |
const_iterator | cbegin () const |
Gets the "begin" iterator value for this array. | |
const_iterator | cend () const |
Gets the "end" iterator value for this array. | |
reference | back () noexcept |
Gets a reference to the "back" element of this array. More... | |
const_reference | back () const noexcept |
Gets a reference to the "back" element of this array. More... | |
void | clear () noexcept |
Clears this array. | |
void | push_back (const_reference value) |
Push "back" the given value. | |
void | pop_back () noexcept |
Pop "back". | |
Static Private Member Functions | |
static void | noop_deleter (void *) |
No-op deleter method. | |
Private Attributes | |
size_type | m_max_size = 0 |
Max size. 8-bytes. | |
size_type | m_size = 0 |
Current size. 8-bytes. | |
pointer | m_data = nullptr |
Pointer to allocated data space. 8-bytes. | |
deleter_type | m_deleter |
Deleter. 8-bytes (with default Deleter). | |
Allocated Array.
|
inlinenoexcept |
Gets a reference to the "back" element of this array.
|
inlinenoexcept |
Gets a reference to the "back" element of this array.