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 & chk )
inlineconstexprnoexcept

Constructs a identifier from an ID and a checker type.

Parameters
idIdentifier of the identifier.
chkObject 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:29
identifier definition class
Definition identifier.hpp:78
Fixed-size collection of heterogeneous fields necessarily named, names are unique.
Definition record.hpp:29