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

◆ make_indexes()

template<std::convertible_to< std::size_t > auto... vs>
auto kumi::make_indexes ( )
inlinenodiscardconstevalnoexcept

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

Note
The arguments should model kumi::index
Template Parameters
vsZero or more values convertible to size_t to construct the indexes from.
Returns
A kumi::projection_map constructed from the vs

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