23#ifndef MYSQL_ABI_HELPERS_DETAIL_ARRAY_BASE_H
24#define MYSQL_ABI_HELPERS_DETAIL_ARRAY_BASE_H
49template <
class Element_t,
class Array_t>
50 requires requires { std::is_trivial_v<Element_t>; }
57 std::ptrdiff_t
ssize()
const {
return (std::ptrdiff_t)
m_size; }
63 operator bool()
const {
return m_size != 0; }
70 assert((int32_t)index <
m_size);
92 assert((int32_t)index <
m_size);
Base class for specific implementations of standard-layout classes for arrays.
Definition: array_base.h:51
const Element_t * cend() const
Definition: array_base.h:109
Element_t * begin()
Definition: array_base.h:80
const Element_t * data() const
Definition: array_base.h:97
std::ptrdiff_t ssize() const
Definition: array_base.h:57
Element_t & operator[](std::size_t index)
Index operator (non-const).
Definition: array_base.h:69
bool empty() const
Definition: array_base.h:60
int32_t m_size
Number of elements in the array.
Definition: array_base.h:115
const Element_t * cbegin() const
Definition: array_base.h:106
std::size_t size() const
Definition: array_base.h:54
Array_t m_data
Array data.
Definition: array_base.h:118
const Element_t * end() const
Definition: array_base.h:103
const Element_t & operator[](std::size_t index) const
Index operator (const).
Definition: array_base.h:91
Element_t * end()
Definition: array_base.h:85
const Element_t * begin() const
Definition: array_base.h:100
Element_t * data()
Definition: array_base.h:75
Definition: array_base.h:37