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

◆ identifiers()

template<concepts::identifier... Ts>
auto kumi::identifiers ( Ts... ts)
inlinenodiscardconstevalnoexcept

Creates a kumi::projection_map object, deducing the target type from the types of arguments.

Note
The arguments should model kumi::identifier
Parameters
tsZero or more indexes to construct the indexes from.
Returns
A kumi::projection_map constructed from the ts

Examples:

#include <kumi/kumi.hpp>
#include <iostream>
using namespace kumi::literals;
int main()
{
std::cout << kumi::projection_map{0_c, "a"_id} << "\n";
std::cout << kumi::projection_map{0_c, 1_c, kumi::projection_map{2_c, 3_c}} << "\n\n";
// Projections maps can be built from functions in simpler cases
std::cout << kumi::indexes(0_c, 1_c, 2_c) << "\n\n";
std::cout << kumi::identifiers("a"_id, "b"_id) << "\n";
}
consteval auto identifiers(Ts... ts) noexcept
Creates a kumi::projection_map object, deducing the target type from the types of arguments.
Definition projections.hpp:167
consteval auto indexes(Ts... ts) noexcept
Creates a kumi::projection_map object, deducing the target type from the types of arguments.
Definition projections.hpp:127
A stateless, compile-time schema for product type transformation.
Definition projections.hpp:34