src/Base/TaggedTuple.hpp file

Tagged tuple allowing tag-based access.

Contents

Tagged tuple allowing tag-based access. This is very much like std::tuple, but instead of having to index the elements by integers, it allows access by a tag, which can be an empty struct with a unique name. Credit goes to ecatmur_at_stackoverflow.com, for more details, see http://stackoverflow.com/questions/13065166/c11-tagged-tuple. For tags, see Control/Tags.h. Tagged tuples are extensively used for transferring data from the parser to an internal data structure in a type-save manner, which is a tagged tuple containing a hierarchy of various containers. As an example on how tagged tuples are used for parsing an input file, see Control/Walker/InputDeck/InputDeck.h. Another way to use a tagged tuple is a compile-time associated container between tags and an arbitrary type. As an example, see rngtest::TestU01Stack::runner.

Namespaces

namespace tk
Toolkit declarations and definitions for general purpose utilities.

Classes

template<class List>
class tk::TaggedTuple
Tagged tuple, allowing tag-based access.