5.11. tagged_list.hpp

Full path: graph_canon/tagged_list.hpp

template<typename TagT, typename T>
class tagged_element

A wrapper for a value of type T, tagged with a type Tag.

using Tag = TagT
T value

The wrapped value.

template<typename ...Elems>
class tagged_list

Holds a tuple of tagged elements, e.g., specializations of tagged_element.

template<typename Tag, typename ...Elems>
auto &get(Tag&&, tagged_list<Elems...> &t)
Returns

a reference to the value of a tagged element in t, tagged with type Tag. For example: get(MyTag(), myTaggedList).

template<typename Tag, typename ...Elems>
auto &get(Tag&&, const tagged_list<Elems...> &t)
Returns

a reference the value of a tagged element in t, tagged with type Tag. For example: get(MyTag(), myTaggedList).