KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches

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

Variables

constexpr values_of_t kumi::values_of {}

Detailed Description

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

Variable Documentation

◆ values_of

values_of_t kumi::values_of {}
inlineconstexprnoexceptnodiscard

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<concepts::product_type T>
constexpr auto values_of(T && t) noexcept;
}
constexpr values_of_t values_of
Definition tuple.hpp:1049
Main KUMI namespace.
Definition algorithm.hpp:11

Parameters

  • t: the product_type from which to extract values.

Return value

  • 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"_id = 1, 2.3, 4.5f, "z"_id = '@' };
kumi::record r = {"x"_id = 1, "y"_id = 2.f, "z"_id = '#', "t"_id = 12};
std::cout << kumi::values_of(t) << "\n";
std::cout << kumi::values_of(r) << "\n";
}
Fixed-size collection of heterogeneous fields with distinct labels.
Definition record.hpp:36
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:35