cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
<array>

Backports related to Standard header <array>

// or as part of:

Including the header brings up std::array , accounting for eg.: location being std::tr1::array where set up in C++03+TR1.

If no TR1 is found and the user has defined the macro CXXOFLAG_USE_INTERNAL_TR1, cxxomfort uses this header to provide its own implementation of array.

An std::array is much like a native C-array in that it has a type and size set up at compile time, but it also adds an interface similar to most of C++'s sequence containers: it has a begin/end, an iterator type, and accepts indexing of elements via the operator[].

Interfaces

Interfaces defined in this section:

Interfaces from TR1 repointed in this section:

Interfaces not in std:

array (cxxomfort)

This header also makes available cxxomfort's implementation of array, found at cxxomfort::array. This implementation differs from std mainly in enabling some constexpr -capable member functions in compilers that were capable but the stdlib did not mark array so, such as modifying operator[] in C++14.

Examples

For other examples see the following entries in cxxomfort-examples:

See Also

See also
header/array @ cppreference (cppreference)
array @ cppreference
cxxomfort\'s array_ref
cxxomfort::array - cxxomfort's own version of array .
experimental/make_array @ cppreference on make_array .
File array.hpp
""
Member cxxomfort::cxxostd::to_array (T(&arr)[N]) -> std::array< typename std::remove_cv< T >::type, N >
Creates a std::array from a native C array.
Member cxxomfort::make_array (T &&... t)
Creates an array (part of experimental/lfv2)
Member cxxomfort::make_cxxo_array (T &&... t)
Creates an array (part of experimental/lfv2)