named_tuple< tuple_type, tuple_names > Struct Template Reference#
|
DiFfRG
|
Public Member Functions |
Static Public Member Functions |
Public Attributes |
Static Public Attributes |
List of all members
DiFfRG::named_tuple< tuple_type, tuple_names > Struct Template Reference
A class to store a tuple with elements that can be accessed by name. The names are stored as FixedString objects and their lookup is done at compile time. More...
#include <tuples.hh>
Public Member Functions | |
| constexpr | operator tuple_type & () |
| named_tuple (tuple_type &&t) | |
| named_tuple (tuple_type &t) | |
| template<size_t idx> | |
| auto & | get () |
| template<size_t idx> | |
| const auto & | get () const |
Static Public Member Functions | |
| template<typename... T> | |
| static constexpr auto | as (std::tuple< T... > &&tup) |
| template<typename... T> | |
| static constexpr auto | as (std::tuple< T... > &tup) |
| static consteval size_t | get_idx (const char *name) |
Public Attributes | |
| tuple_type | tuple |
Static Public Attributes | |
| static constexpr size_t | size = tuple_names::size |
| static constexpr auto | names = tuple_names::names |
Detailed Description
template<typename tuple_type, typename tuple_names>
struct DiFfRG::named_tuple< tuple_type, tuple_names >
struct DiFfRG::named_tuple< tuple_type, tuple_names >
A class to store a tuple with elements that can be accessed by name. The names are stored as FixedString objects and their lookup is done at compile time.
- Template Parameters
-
tuple_type The type of the underlying tuple. strs The names of the elements in the tuple.
Constructor & Destructor Documentation
◆ named_tuple() [1/2]
template<typename tuple_type , typename tuple_names >
|
inline |
◆ named_tuple() [2/2]
template<typename tuple_type , typename tuple_names >
|
inline |
Member Function Documentation
◆ as() [1/2]
template<typename tuple_type , typename tuple_names >
template<typename... T>
|
inlinestaticconstexpr |
◆ as() [2/2]
template<typename tuple_type , typename tuple_names >
template<typename... T>
|
inlinestaticconstexpr |
◆ get() [1/2]
template<typename tuple_type , typename tuple_names >
template<size_t idx>
|
inline |
◆ get() [2/2]
template<typename tuple_type , typename tuple_names >
template<size_t idx>
|
inline |
◆ get_idx()
template<typename tuple_type , typename tuple_names >
|
inlinestaticconsteval |
◆ operator tuple_type &()
template<typename tuple_type , typename tuple_names >
|
inlineconstexpr |
Member Data Documentation
◆ names
template<typename tuple_type , typename tuple_names >
|
staticconstexpr |
◆ size
template<typename tuple_type , typename tuple_names >
|
staticconstexpr |
◆ tuple
template<typename tuple_type , typename tuple_names >
| tuple_type DiFfRG::named_tuple< tuple_type, tuple_names >::tuple |
The documentation for this struct was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/tuples.hh
Generated by