KUMI
v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches
◆
identifier()
template<typename ID, typename Checker>
kumi::identifier
< ID, Checker >::identifier
(
ID const &
id
,
Checker const &
check
)
inline
constexpr
noexcept
Constructs an identifier from an ID and a checker type.
Parameters
id
Identifier of the identifier.
check
Object performing the compile-time verification of the identifier's value.
#include <kumi/kumi.hpp>
#include <iostream>
using namespace
kumi::literals;
inline
constexpr
auto
char_value =
kumi::identifier
(
"character"
_id,
kumi::only<char>
);
int
main()
{
std::cout <<
kumi::record
{ char_value =
'Z'
} <<
"\n"
;
}
kumi::only
constexpr kumi::only_t< T > only
Option restricting an identifier to accept a single type T.
Definition
identifier.hpp:31
kumi::identifier
identifier definition class
Definition
identifier.hpp:86
kumi::record
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition
record.hpp:36
kumi
identifier