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

◆ only

template<typename T>
only_t<T> kumi::only = {}
inlineconstexpr

Option specifying the single type a identifier will accept.

Template Parameters
TType that the parametrized identifier will accept.
#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