cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
Public Member Functions | List of all members
array< T, N > Struct Template Reference

C++11 array class. More...

Public Member Functions

CXXO_CONSTEXPR14 pointer data () CXXO_NOEXCEPTNOTHROW
 Access to the underlying array.
 
CXXO_CONSTEXPR const_pointer data () const CXXO_NOEXCEPTNOTHROW
 Access to the underlying array.
 
CXXO_CONSTEXPR size_t size () const CXXO_NOEXCEPTNOTHROW
 Size of the array (the same as the constant N )
 
CXXO_CONSTEXPR size_t max_size () const CXXO_NOEXCEPTNOTHROW
 Maximum size of the array (the same as size )
 
CXXO_CONSTEXPR bool empty () const CXXO_NOEXCEPTNOTHROW
 Returns true if the array is empty.
 
reference front () CXXO_NOEXCEPTNOTHROW
 Direct access to the first element.
 
reference back () CXXO_NOEXCEPTNOTHROW
 Direct access to the last element.
 
CXXO_CONSTEXPR14 reference operator[] (size_t i) CXXO_NOEXCEPTNOTHROW
 Indexed access (non-throwing)
 
reference at (size_t i)
 Indexed access (throwing)
 

Detailed Description

template<typename T, size_t N>
struct cxxomfort::cxxostd::array< T, N >

C++11 array class.

std::array<T,N> implementation

Template Parameters
Nthe size of the array at compile time
C++03/TR1 Backports:
std::array backport

An implementation of C++03-TR1/C++11's std::array with some minor changes.

While this implementation is mostly intended for compilers that don't ship their own std::array , cxxomfort can also use it to supplement some features missing from std::array in given C++ versions, such as constexpr operator access. In this case, it's exposed also as cxxomfort::array .

Main differences from TR1's array:

See also
https://wg21.link/n1479

The documentation for this struct was generated from the following files: