Empirical
|
#include <array.h>
Classes | |
struct | iterator_wrapper |
Setup an iterator wrapper to make sure that they're valid. More... | |
Public Types | |
using | iterator = iterator_wrapper< typename base_t::iterator > |
using | const_iterator = iterator_wrapper< typename base_t::const_iterator > |
using | reverse_iterator = iterator_wrapper< typename base_t::reverse_iterator > |
using | const_reverse_iterator = iterator_wrapper< typename base_t::const_reverse_iterator > |
using | value_type = T |
using | size_type = typename base_t::size_type |
using | reference = typename base_t::reference |
using | const_reference = typename base_t::const_reference |
Public Member Functions | |
array () | |
array (const this_t &_in) | |
array (std::initializer_list< T > in_list) | |
array (const base_t &in) | |
template<typename InputIt > | |
array (InputIt first, InputIt last) | |
~array () | |
operator std::array< T, N > () | |
constexpr size_t | size () const |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
this_t & | operator= (const this_t &)=default |
T & | operator[] (size_t pos) |
const T & | operator[] (size_t pos) const |
T & | back () |
const T & | back () const |
T & | front () |
const T & | front () const |
void | fill (const T &val) |
void | resize (size_t new_size) |
void | resize (size_t new_size, const T &val) |
template<typename... PB_Ts> | |
void | push_back (PB_Ts &&...args) |
void | pop_back () |
template<typename... ARGS> | |
iterator | insert (ARGS &&...args) |
template<typename... ARGS> | |
iterator | erase (ARGS &&...args) |
template<typename... ARGS> | |
iterator | emplace (ARGS &&...args) |
template<typename... ARGS> | |
void | emplace_back (ARGS &&...args) |
Public Attributes | |
bool | valid |
We are in debug mode, so emp::array has the same interface as std::array, but with extra bounds checking. Using vector as our base since it has the right pieces and is dyanmic.
using emp::array< T, N >::const_iterator = iterator_wrapper< typename base_t::const_iterator > |
using emp::array< T, N >::const_reference = typename base_t::const_reference |
using emp::array< T, N >::const_reverse_iterator = iterator_wrapper< typename base_t::const_reverse_iterator > |
using emp::array< T, N >::iterator = iterator_wrapper< typename base_t::iterator > |
using emp::array< T, N >::reference = typename base_t::reference |
using emp::array< T, N >::reverse_iterator = iterator_wrapper< typename base_t::reverse_iterator > |
using emp::array< T, N >::size_type = typename base_t::size_type |
using emp::array< T, N >::value_type = T |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool emp::array< T, N >::valid |