MySQL 9.1.0
Source Code Documentation
|
Base class for specific implementations of standard-layout classes for arrays. More...
#include <array_base.h>
Public Member Functions | |
std::size_t | size () const |
std::ptrdiff_t | ssize () const |
bool | empty () const |
operator bool () const | |
Element_t & | operator[] (std::size_t index) |
Index operator (non-const). More... | |
Element_t * | data () |
Element_t * | begin () |
Element_t * | end () |
const Element_t & | operator[] (std::size_t index) const |
Index operator (const). More... | |
const Element_t * | data () const |
const Element_t * | begin () const |
const Element_t * | end () const |
const Element_t * | cbegin () const |
const Element_t * | cend () const |
Protected Attributes | |
int32_t | m_size |
Number of elements in the array. More... | |
Array_t | m_data |
Array data. More... | |
Base class for specific implementations of standard-layout classes for arrays.
This stores the length and the array, and exposes iterators, index operators and member functions to query size/emptiness.
Element_t | The type of each element. |
Array_t | The type of the array, for example Element_t * or Element_t[7] . |
|
inline |
Actually, just the raw pointer. This is a contiguous iterator.
|
inline |
|
inline |
|
inline |
|
inline |
begin()
).
|
inline |
cbegin()
).
|
inline |
|
inline |
Actually, just the raw pointer. This is a contiguous iterator.
|
inline |
|
inline |
|
inline |
Index operator (non-const).
index | Array index. |
|
inline |
Index operator (const).
index | Array index. |
|
inline |
|
inline |
|
protected |
Array data.
|
protected |
Number of elements in the array.
We keep it as 32 bits, so that small arrays may fit in 64 bits.