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

◆ values_of()

template<product_type T>
constexpr auto kumi::values_of ( T &&  t)
inlineconstexprnoexcept

Extracts the values of the fields of a kumi::product_type.

Template Parameters
Tthe type of the product_type from which to extract names.
Parameters
tthe product_type from which to extract names.
Returns
A tuple of references to the values of a kumi::product_type.

Example:

#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
kumi::tuple t = { "x"_f = 1, 2.3, 4.5f, "z"_f = '@' };
kumi::record r = {"x"_f = 1, "y"_f = 2.f, "z"_f = '#', "t"_f = 12};
std::cout << kumi::values_of(t) << "\n";
std::cout << kumi::values_of(r) << "\n";
}
constexpr auto values_of(T &&t) noexcept
Extracts the values of the fields of a kumi::product_type.
Definition meta.hpp:46
Fixed-size collection of heterogeneous fields necessarily named, names are unique.
Definition traits.hpp:366
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37