Provides tagging utilities (often used in tag-dispatching). More...
Collaboration diagram for Tag:Classes | |
| struct | bio::meta::priority_tag< I > |
| A tag that allows controlled overload resolution via implicit base conversion rules. More... | |
| struct | bio::meta::priority_tag< 0 > |
| Recursion anchor for bio::meta::priority_tag. More... | |
| struct | bio::meta::vtag_t< vs > |
| The type of bio::meta::vtag. [Declaration]. More... | |
| struct | bio::meta::vtag_t< v > |
| The type of bio::meta::vtag. [Specialisation for 1 argument]. More... | |
| struct | bio::meta::vtag_t< vs... > |
| The type of bio::meta::vtag. [Specialisation for 2 or more arguments]. More... | |
| struct | bio::meta::vtag_t<> |
| The type of bio::meta::vtag. [Specialisation for 0 arguments.]. More... | |
Functions | |
| template<detail::literal_buffer_string str> | |
| consteval auto | bio::meta::literals::operator""_vtag () noexcept |
| String literal operator for creating vtags. | |
Variables | |
| template<typename type , typename... more_types> | |
| constinit type_list< type, more_types... > | bio::meta::ttag {} |
| A type-tag template. | |
| template<auto... vs> | |
| constexpr vtag_t< vs... > | bio::meta::vtag {} |
| A value-tag template. | |
Provides tagging utilities (often used in tag-dispatching).
|
noexcept |
String literal operator for creating vtags.
Integer literal operator for creating vtags.
| str | A buffer for the literal. |
Creates bio::meta::vtag from a string literal.
The returned tag will be of type bio::meta::vtag_t<bio::ranges::small_string<str.size()>{str}>.
The tags allow compile-time comparisons of the the string-literals:
The allows very self-descriptive dispatching.
| chrs | The literal buffer. |
Creates bio::meta::vtag from a numeric literal.
The returned tag will be of type bio::meta::vtag<int64_t{NUMBER}>, where NUMBER is the integer you passed.
Reduces the verbosity of tag-dispatching:
Negative literals are supported:
|
inline |
A type-tag template.
| type | The first type to store. |
| more_types | More types to store (optional). |
Using this template, you can easily turn a type into a compile-time constant (value).
|
inlineconstexpr |
A value-tag template.
| vs | The values to store in the tag. |
Using this template, you can easily turn a value, e.g. a literal value, into a compile-time constant with a unique type.
Dispatching between two overloads: