Applies the Callable object f on each element of a kumi::record_type and its field.
#include <kumi/kumi.hpp>
#include <string_view>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto t =
kumi::record{
"a"_id = 1,
"b"_id = 2.3,
"c"_id = 0.43f };
{
if(
name.as<std::string_view>().ends_with(
"a"))
m += 10;
m = (m * 100) -1;
else
m *= 10;
}
, t
);
std::cout << t << "\n";
}
Compile-time text based ID.
Definition identifier.hpp:147
Fixed-size collection of heterogeneous fields necessarily named, names are unique.
Definition record.hpp:29
Static string used to create named fields.
Definition str.hpp:20