header_utils
|
Same as std::array
except it takes an enum type instead of the size, and uses magic_enum
to determine the array size; also allows for indexing with the enum type.
More...
#include <enums.h>
Inherits std::array< VALUE_TYPE, magic_enum::enum_count< ENUM_TYPE >()>.
Public Types | |
using | array_type = std::array< VALUE_TYPE, magic_enum::enum_count< ENUM_TYPE >()> |
using | value_type = array_type::value_type |
using | size_type = array_type::size_type |
using | difference_type = array_type::difference_type |
using | pointer = array_type::pointer |
using | const_pointer = array_type::const_pointer |
using | reference = array_type::reference |
using | const_reference = array_type::const_reference |
using | iterator = array_type::iterator |
using | const_iterator = array_type::const_iterator |
using | reverse_iterator = array_type::reverse_iterator |
using | const_reverse_iterator = array_type::const_reverse_iterator |
using | enum_type = ENUM_TYPE |
Public Member Functions | |
constexpr reference | at (ENUM_TYPE pos) |
constexpr const_reference | at (ENUM_TYPE pos) const |
constexpr reference | operator[] (ENUM_TYPE pos) noexcept |
constexpr const_reference | operator[] (ENUM_TYPE pos) const noexcept |
Same as std::array
except it takes an enum type instead of the size, and uses magic_enum
to determine the array size; also allows for indexing with the enum type.
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::array_type = std::array<VALUE_TYPE, magic_enum::enum_count<ENUM_TYPE>()> |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::const_iterator = array_type::const_iterator |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::const_pointer = array_type::const_pointer |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::const_reference = array_type::const_reference |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::const_reverse_iterator = array_type::const_reverse_iterator |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::difference_type = array_type::difference_type |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::enum_type = ENUM_TYPE |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::iterator = array_type::iterator |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::pointer = array_type::pointer |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::reference = array_type::reference |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::reverse_iterator = array_type::reverse_iterator |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::size_type = array_type::size_type |
using ghassanpl::enum_array< VALUE_TYPE, ENUM_TYPE >::value_type = array_type::value_type |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |