This function does not exist in the kumi namespace, it is supposed to be found via Argument Dependant Lookup for user defined types. It is used in order to handle identifiers/fields display and manipulations. to_str needs to be constexpr callable, if not some concepts might fail unexpectedly.
#include <kumi/kumi.hpp>
#include <iostream>
#include <string>
#include <cstdint>
namespace ns
{
{
friend constexpr auto to_str(tax_t
const&)
{
}
};
inline constexpr tax_t tax{};
struct deduction_t : kumi::identifier<deduction_t>
{
using kumi::identifier<deduction_t>::operator=;
};
inline constexpr deduction_t deduction{};
}
int main()
{
kumi::record payment= {ns::tax = 12.80, ns::deduction = 10.8};
std::cout << payment << "\n";
}
kumi::str constexpr to_str(auto e)
Provides an extension point to_str in order to output types with no textual representation defined.
identifier definition class
Definition identifier.hpp:86
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition record.hpp:36
Static string used to create named fields.
Definition str.hpp:24