#include <kumi/kumi.hpp>
#include <iostream>
{
friend constexpr auto to_str(my_id) {
return kumi::str{
"Specific label"}; }
};
inline constexpr my_id my_kw{};
int main()
{
using namespace kumi::literals;
auto field = (
"x"_id = 1 );
int standard = { 12 };
auto custom = (my_kw = 255);
std::cout <<
field <<
"\n";
std::cout << kumi::label_of<decltype(field)>() << "\n";
std::cout << standard << "\n";
std::cout << kumi::label_of<decltype(standard)>() << "\n";
std::cout << custom << "\n";
std::cout << kumi::label_of<decltype(custom)>() << "\n";
}
kumi::str constexpr to_str(auto e)
Provides an extension point to_str in order to output types with no textual representation defined.
Named wrapper over a type.
Definition field.hpp:26
identifier definition class
Definition identifier.hpp:86
Static string used to create named fields.
Definition str.hpp:24