KUMI v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches

◆ identifier()

template<typename ID, typename Checker>
kumi::identifier< ID, Checker >::identifier ( ID const & id,
Checker const & check )
inlineconstexprnoexcept

Constructs a identifier from an ID and a checker type.

Parameters
idIdentifier of the identifier.
checkObject 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";
}
constexpr only_t< T > only
Option specifying the single type a identifier will accept.
Definition identifier.hpp:31
identifier definition class
Definition identifier.hpp:86
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition record.hpp:36