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/Inciter/InputDeck/InputDeck.h. Another way to use a tagged tuple is a compile-time associated container between tags and an arbitrary type.

Namespaces

namespace tag
Tags used as unique-type labels for compile-time code-generation.
namespace tk
Toolkit declarations and definitions for general purpose utilities.

Classes

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

Defines

#define DEFTAG(n)
Printable tag for TaggedTuple that returns its name.