4.6.0
Freundlich's C++ toolkit
|
An array indexed with an enum.
This class is like fcppt::array::object, except that operator[]
takes a parameter of type Enum. This class is meant to be used with contiguous enums.
Enum | The enum type to use as an index which also determines the array's size. |
Classes | |
struct | from_internal |
Public Types | |
using | enum_type = Enum |
using | static_size = fcppt::enum_::size<Enum> |
using | internal = fcppt::array::object<Value, static_size::value> |
using | value_type = typename internal::value_type |
using | reference = typename internal::reference |
using | const_reference = typename internal::const_reference |
using | iterator = typename internal::iterator |
using | const_iterator = typename internal::const_iterator |
using | pointer = typename internal::pointer |
using | const_pointer = typename internal::const_pointer |
Public Member Functions | |
template<typename... Args> requires ( fcppt::enum_::size<Enum>::value == sizeof...(Args) && std::conjunction_v<std::is_constructible<Value, Args>...>) | |
constexpr | array (Args &&...) noexcept(std::conjunction_v< std::is_nothrow_constructible< Value, Args >... >) |
constexpr | array (from_internal, internal &&) noexcept(std::is_nothrow_move_constructible_v< internal >) |
reference | operator[] (Enum) noexcept |
const_reference | operator[] (Enum) const noexcept |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
pointer | data () |
const_pointer | data () const |
constexpr internal & | impl () noexcept |
constexpr internal const & | impl () const noexcept |
using fcppt::enum_::array< Enum, Value >::const_iterator = typename internal::const_iterator |
using fcppt::enum_::array< Enum, Value >::const_pointer = typename internal::const_pointer |
using fcppt::enum_::array< Enum, Value >::const_reference = typename internal::const_reference |
using fcppt::enum_::array< Enum, Value >::enum_type = Enum |
using fcppt::enum_::array< Enum, Value >::internal = fcppt::array::object<Value, static_size::value> |
using fcppt::enum_::array< Enum, Value >::iterator = typename internal::iterator |
using fcppt::enum_::array< Enum, Value >::pointer = typename internal::pointer |
using fcppt::enum_::array< Enum, Value >::reference = typename internal::reference |
using fcppt::enum_::array< Enum, Value >::static_size = fcppt::enum_::size<Enum> |
using fcppt::enum_::array< Enum, Value >::value_type = typename internal::value_type |
|
explicitconstexprnoexcept |
|
constexprnoexcept |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |