Inherits T.
|
| template<typename... Ts> |
| constexpr | named (Ts &&...ts) |
| | Forwarding constructor.
|
| |
template<typename U , string_literal... UNAMES>
requires (sizeof...(NAMES) == sizeof...(UNAMES)) |
| constexpr | named (named< U, UNAMES... > &&src) |
| | Reshuffle constructor (based on matching names)
|
| |
template<typename U , string_literal... UNAMES>
requires (sizeof...(NAMES) == sizeof...(UNAMES)) |
| constexpr | named (const named< U, UNAMES... > &src) |
| | Reshuffle constructor (based on matching names)
|
| |
template<typename U , string_literal... UNAMES>
requires (sizeof...(NAMES) == sizeof...(UNAMES)) |
| named | operator= (const named< U, UNAMES... > &src) |
| | reshuffle assignment
|
| |
template<typename... Ts>
requires (sizeof...(NAMES) == sizeof...(Ts)) |
| named | operator= (const std::tuple< Ts... > &src) |
| | unnamed assignment
|
| |
|
| constexpr T & | values (void) |
| | \names Querry/cast values from the underlying container
|
| |
| constexpr const T & | values (void) const |
| |
| constexpr | operator T (void) |
| |
|
| template<size_t IDX> |
| constexpr decltype(auto) | get (void) |
| |
| template<size_t IDX> |
| constexpr decltype(auto) | get (void) const |
| |
| template<string_literal NAME, string_literal... SUBNAME> |
| constexpr decltype(auto) | get (void) |
| |
| template<string_literal NAME, string_literal... SUBNAME> |
| constexpr decltype(auto) | get (void) const |
| |
|
| template<size_t IDX> |
| static constexpr auto | name = std::get<IDX>(std::make_tuple(NAMES...)) |
| | query name by index
|
| |
| static constexpr auto | names = std::make_tuple(NAMES...) |
| | tuple of all names
|
| |
| template<string_literal NAME> |
| static constexpr bool | has_name = (named<T,NAMES...>::template _find_name<0,NAME,NAMES...>() != sizeof...(NAMES)) |
| | check if has_name
|
| |
| template<string_literal NAME> |
| static constexpr size_t | find_name = named<T,NAMES...>::template _find_name<0,NAME,NAMES...>() |
| | find index of name (size if not found); uses a linear search
|
| |
| static constexpr size_t | size = sizeof...(NAMES) |
| | size (number of names/elements in value_type)
|
| |
template<typename T, string_literal... NAMES>
requires (sizeof...(NAMES) == 0) || (concepts::gettable<T> && (sizeof...(NAMES) == std::tuple_size_v<std::decay_t<T>>))
struct bbm::named< T, NAMES >
named container
- Template Parameters
-
| T | = underlying container type; must support std::get and std::tuple_size_v |
| NAMES | = names of each element |