cxxomfort
rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Backports related to Standard header <array>
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 defined in this section:
std::array
(C++11) (only if explicitly instructed to use internal TR1)Interfaces repointed in this section:
std::array (C++11) - C++ type version of a C-array.
get(std::array) - Get an element from an array by its compile-time index.For other examples see the following entries in cxxomfort-examples
:
array - usage of array and related functions.array_ref