11 Algorithms library [algorithms]

11.2 Tag specifiers [alg.tagspec]

namespace tag { struct in { /* implementation-defined */ }; struct in1 { /* implementation-defined */ }; struct in2 { /* implementation-defined */ }; struct out { /* implementation-defined */ }; struct out1 { /* implementation-defined */ }; struct out2 { /* implementation-defined */ }; struct fun { /* implementation-defined */ }; struct min { /* implementation-defined */ }; struct max { /* implementation-defined */ }; struct begin { /* implementation-defined */ }; struct end { /* implementation-defined */ }; }

In the following description, let X be the name of a type in the tag namespace above.

tag::X is a tag specifier ([taggedtup.tagged]) such that TAGGET(D, tag::X, N) names a tagged getter ([taggedtup.tagged]) with DerivedCharacteristic D, ElementIndex N, and ElementName X.

Example: tag::in is a type such that TAGGET(D, tag::in, N) names a type with the following interface:

struct __input_getter {
  constexpr decltype(auto) in() &       { return get<N>(static_cast<D&>(*this)); }
  constexpr decltype(auto) in() &&      { return get<N>(static_cast<D&&>(*this)); }
  constexpr decltype(auto) in() const & { return get<N>(static_cast<const D&>(*this)); }
};

 — end example ]