CatapultServer
v0.5.0.1 (Elephant)
|
An array that checks for overflow. More...
Public Member Functions | |
CheckedArray () | |
bool | empty () const |
Returns true if the array is empty, false otherwise. More... | |
size_t | size () const |
Gets the size of the array. More... | |
size_t | capacity () const |
Gets the capacity of the array. More... | |
void | push_back (T val) |
const T * | begin () const |
Returns a const iterator that represents first element. More... | |
const T * | end () const |
Returns a const iterator that represents one past last element. More... | |
const T * | cbegin () const |
Returns a const iterator that represents first element. More... | |
const T * | cend () const |
Returns a const iterator that represents one past last element. More... | |
T & | operator[] (size_t index) |
const T & | operator[] (size_t index) const |
constexpr bool | operator== (const CheckedArray &rhs) const |
Returns true if this array is equal to rhs. More... | |
constexpr bool | operator!= (const CheckedArray &rhs) const |
Returns true if this array is not equal to rhs. More... | |
Private Attributes | |
T | m_data [N] |
size_t | m_size |
An array that checks for overflow.
|
inline |
|
inline |
Returns a const iterator that represents first element.
|
inline |
Gets the capacity of the array.
|
inline |
Returns a const iterator that represents first element.
|
inline |
Returns a const iterator that represents one past last element.
|
inline |
Returns true
if the array is empty, false
otherwise.
|
inline |
Returns a const iterator that represents one past last element.
|
inlineconstexpr |
Returns true
if this array is not equal to rhs.
|
inlineconstexpr |
Returns true
if this array is equal to rhs.
|
inline |
Returns a reference to the element at index.
|
inline |
Returns the element at index.
|
inline |
Appends val at the end of the array.
|
inline |
Gets the size of the array.
|
private |
|
private |