identifier definition class More...
#include <kumi/utils/identifier.hpp>
identifier definition class
kumi::identifier defines a identifier, i.e an entity that can receive values and can be stored as part of a product type. It is defined by a unique type ID which can be an actual type or generated from kumi::name and an optional checking operations that will validate the value passed to the identifier is acceptable.
kumi::identifier can also be used to define custom identifier type with specific behavior.
| ID | identifier type being defined |
| Checker | Potential type checker meta-function. By default, this is void to notify no check is performed. |
Public Types | |
| using | tag_type = identifier<ID, Checker> |
| Derived identifier type. | |
Public Member Functions | |
| constexpr | identifier () noexcept |
| Default constructor. | |
| constexpr | identifier (ID const &id, Checker const &chk) noexcept |
| Constructs a identifier from an ID and a checker type. | |
| template<typename T> | |
| constexpr field< tag_type, std::unwrap_ref_decay_t< T > > | operator= (T &&v) const noexcept |
| Assignment of a value to a identifier. | |
Friends | |
| constexpr str | to_str (identifier< ID, Checker > const &) |
| A checked field str representation is the underlying type, checker is ignored. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename CharT, typename Traits> | |
| std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &os, identifier const &id) noexcept |
| Output stream insertion. | |