KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches
kumi Namespace Reference

Main KUMI namespace. More...

Detailed Description

Main KUMI namespace.

Classes

struct  apply_traits
 Unpacks a product type and applies its element types as arguments to a meta-function. More...
class  array
 Fixed-size collection of homogeneous values. More...
class  as
 Lightweight type-wrapper. More...
struct  as_array
 Generate a kumi::array type from a type. More...
struct  as_tuple
 Generate a kumi::tuple type from a type. More...
class  builder
 kumi::builder provides a generic way of defining a product type. More...
struct  common_product_type
 Extracts the common product_type of a parameter pack. More...
class  field
 Named wrapper over a type. More...
struct  field< Id, T >
 Specialisation to clearly indicate an error. More...
class  identifier
 identifier definition class More...
class  index_t
 Integral constant type. More...
class  label_t
 Literal constant type. More...
struct  map_traits
 Applies a unary meta-function to each element of a product type. More...
class  name
 Compile-time text based identifier. More...
class  projection_map
 A stateless, compile-time schema for product type transformation. More...
class  record
 Fixed-size collection of heterogeneous fields with distinct labels. More...
class  str
 Static string used to create named fields. More...
class  tuple
 Fixed-size collection of heterogeneous values. More...
class  unit
 A type representing the product of no type, also called the unit type. More...
class  unknown
 Type indicating an identifier was not found in a given kumi::product_type. More...

Typedefs

template<typename T>
using container_type_t = decltype(kumi_implementation_defined)
 Provides access to the type of the elements of a kumi::concepts::container.
template<std::size_t I, typename T>
using element_t = std::tuple_element_t<I, std::remove_cvref_t<T>>
 Provides indexed access to the types of the elements of a kumi::product_type.
template<typename Field, typename T>
using field_of_t = decltype(get<kumi_implementation_defined{}>(kumi::declval<T&&>()))
 The type of the value of T selected by the field Field, resolved by name the same way as kumi::member resolves by index (going through kumi::get).
template<std::size_t I, typename T>
using member_t = decltype(get<I>(kumi::declval<T&&>()))
 Computes the return type of a call to kumi::get.
template<std::size_t I, typename T>
using stored_element_t = decltype(kumi_implementation_defined)
 Provides indexed access to the types of the elements of a product type and unwraps the returned field for record type.
template<std::size_t I, typename T>
using stored_member_t = decltype(kumi_implementation_defined)
 Computes the return type of a call to kumi::get on a kumi::tuple and unwrap the field returned by kumi::get on a kumi::record.

Functions

template<typename C, typename... Ts>
requires (std::is_move_constructible_v<std::decay_t<C>> && (std::is_move_constructible_v<std::decay_t<Ts>> && ...))
constexpr auto bind_back (C &&c, Ts &&... ts) noexcept(std::is_nothrow_move_constructible_v< std::decay_t< C > > &&(std::is_nothrow_move_constructible_v< std::decay_t< Ts > > &&...))
template<typename C, typename... Ts>
requires (std::is_move_constructible_v<std::decay_t<C>> && (std::is_move_constructible_v<std::decay_t<Ts>> && ...))
constexpr auto bind_front (C &&c, Ts &&... ts) noexcept(std::is_nothrow_move_constructible_v< std::decay_t< C > > &&(std::is_nothrow_move_constructible_v< std::decay_t< Ts > > &&...))
template<kumi_implementation_defined auto Name, typename T>
decltype(auto) constexpr capture_field (T &&t) noexcept
template<typename U, typename T>
decltype(auto) constexpr field_cast (T &&t) noexcept
template<typename T>
constexpr decltype(auto) field_value_of (T &&t) noexcept
template<kumi::concepts::identifier Id, kumi::concepts::product_type T>
requires (kumi::concepts::queryable_by_identifier<Id, T>)
consteval auto get_index_of_field ()
template<kumi::str L, kumi::concepts::product_type T>
requires (kumi::concepts::queryable_by_label<kumi::label_t<L>, T>)
consteval auto get_index_of_label ()
template<typename U, kumi::concepts::product_type T>
requires (kumi::concepts::queryable_by_type<U, T>)
consteval auto get_index_of_type ()
template<typename T>
consteval auto identifier_of () noexcept
template<kumi::concepts::identifier... Ts>
consteval auto identifiers (Ts...) noexcept
template<kumi::concepts::index... Ts>
consteval auto indexes (Ts...) noexcept
template<typename T>
consteval kumi_implementation_defined auto label_of () noexcept
template<std::convertible_to< std::size_t > auto... vs>
consteval auto make_indexes () noexcept
template<char... c>
constexpr auto operator""_c () noexcept
 Forms a integral constant literal of the desired value.
template<kumi::str ID>
constexpr auto operator""_id () noexcept
 Forms a constant string literal of the desired value.
template<kumi::str ID>
constexpr auto operator""_l () noexcept
 Forms a constant string literal of the desired value.
template<typename CharT, typename Traits, typename T, std::size_t N>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, array< T, N > const &a) noexcept
 Inserts a kumi::array in an output stream.
template<typename CharT, typename Traits, typename... Ts>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, record< Ts... > const &t) noexcept
 Inserts a kumi::record in an output stream.
template<typename CharT, typename Traits, typename... Ts>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, tuple< Ts... > const &t) noexcept
 Inserts a kumi::tuple in an output stream.
template<kumi::concepts::identifier L, kumi::concepts::identifier R>
constexpr bool operator== (L const &, R const &)
 identifier comparison
template<template< class > class Pred>
constexpr auto predicate () noexcept
 Convert a unary template meta-program in a running predicate.
template<kumi::concepts::projection... Ts>
 projection_map (Ts...) -> projection_map< Ts

Variables

constexpr all_of_t all_of {}
constexpr all_unique_t all_unique {}
template<typename... Ts>
constexpr bool all_unique_names_v = kumi_implementation_defined
 Checks if a parameter pack only contains distinct kumi::field names. Evaluates to false if no type is a kumi::field.
template<typename... Ts>
constexpr bool all_uniques_v = kumi_implementation_defined
 Checks if a parameter pack only contains distinct types.
constexpr any_of_t any_of {}
constexpr apply_t apply {}
constexpr apply_field_t apply_field {}
template<typename... Ts>
constexpr bool are_uniform_product_types_v = sizeof...(Ts) == 0
constexpr as_flat_ptr_t as_flat_ptr {}
constexpr back_t back {}
constexpr bit_and_t bit_and {}
constexpr bit_or_t bit_or {}
constexpr bit_xor_t bit_xor {}
constexpr cartesian_product_t cartesian_product {}
constexpr cat_t cat {}
template<std::size_t N>
constexpr tiles_t< N, N > chunks {}
constexpr compress_t compress {}
template<typename T>
constexpr std::size_t container_size_v = kumi_implementation_defined
 Returns the statically known number of elements of a kumi::container.
constexpr contains_t contains {}
constexpr contains_any_t contains_any {}
constexpr contains_none_t contains_none {}
constexpr contains_only_t contains_only {}
constexpr count_t count {}
constexpr count_if_t count_if {}
template<typename T, typename...>
kumi::declfn_t< T && > declval
 Converts a type T to an rvalue reference type for use in unevaluated contexts.
constexpr exclusive_scan_left_t exclusive_scan_left {}
constexpr exclusive_scan_right_t exclusive_scan_right {}
constexpr extract_t extract {}
template<std::size_t N>
constexpr fill_t< N > fill {}
template<template< typename > typename Pred>
constexpr filter_t< Pred > filter {}
template<template< typename > typename Pred>
constexpr filter_not_t< Pred > filter_not {}
constexpr flatten_t flatten {}
constexpr flatten_all_t flatten_all {}
constexpr fold_left_t fold_left {}
constexpr fold_right_t fold_right {}
constexpr for_each_t for_each {}
constexpr for_each_field_t for_each_field {}
constexpr for_each_index_t for_each_index {}
constexpr forward_as_array_t forward_as_array {}
template<kumi::concepts::identifier auto... Fields>
constexpr forward_as_record_t< Fields... > forward_as_record {}
constexpr forward_as_tuple_t forward_as_tuple {}
template<typename Type>
constexpr from_array_t< Type > from_array {}
template<kumi::concepts::record_type Type>
constexpr from_record_t< Type > from_record {}
template<typename Type>
constexpr from_tuple_t< Type > from_tuple {}
constexpr front_t front {}
template<std::size_t N>
constexpr generate_t< N > generate {}
template<typename T>
constexpr bool has_static_size_v
template<template< class > typename Traits>
constexpr traits_check< Traits > if_ = {}
 Option restricting an identifier to accept values whose type satisfies the trait Traits.
constexpr inclusive_scan_left_t inclusive_scan_left {}
constexpr inclusive_scan_right_t inclusive_scan_right {}
constexpr inner_product_t inner_product {}
constexpr invoke_t invoke {}
 Callable object invoking the Callable object c with a pack of arguments.
template<typename R>
constexpr invoke_r_t< R > invoke_r {}
 Callable object invoking the Callable object c with a pack of arguments and returning a value of type R.
template<std::size_t N>
constexpr iota_t< N > iota {}
template<typename U, typename V>
constexpr bool is_comparable_v
template<typename T>
constexpr bool is_container_v = kumi_implementation_defined
template<typename T, typename U>
constexpr bool is_equality_comparable_v = false
template<typename T, typename U>
constexpr bool is_equivalent_v = false
template<typename T>
constexpr bool is_homogeneous_v = false
template<typename T, typename U>
constexpr bool is_instance_of_v = false
 Checks if a type is an instance of a specific template.
template<typename U, typename V>
constexpr bool is_ordered_v
template<typename T>
constexpr bool is_power_type_v = kumi_implementation_defined
 Opt-in traits for types behaving like a kumi::power_type.
template<typename T>
constexpr bool is_product_type_v = kumi_implementation_defined
 Detects if a type follows the tuple protocol.
template<typename T>
constexpr bool is_projection_map_v = requires { T::is_projection_map; }
template<typename T>
constexpr bool is_record_type_v
constexpr locate_t locate {}
constexpr make_array_t make_array {}
constexpr make_record_t make_record {}
constexpr make_tuple_t make_tuple {}
constexpr map_t map {}
constexpr map_field_t map_field {}
constexpr map_index_t map_index {}
constexpr map_reduce_t map_reduce {}
constexpr max_t max {}
constexpr max_flat_t max_flat {}
template<typename T>
constexpr member_cast_t< T > member_cast {}
constexpr members_of_t members_of {}
constexpr min_t min {}
constexpr min_flat_t min_flat {}
constexpr none_of_t none_of {}
constexpr auto npos = static_cast<std::size_t>(-1)
 This is a special value equal to the largest value representable by the type std::size_t.
template<typename T>
constexpr kumi::only_t< T > only = {}
template<template< typename > typename Pred>
constexpr partition_t< Pred > partition {}
constexpr pop_back_t pop_back {}
constexpr pop_front_t pop_front {}
constexpr prod_t prod {}
constexpr push_back_t push_back {}
constexpr push_front_t push_front {}
constexpr reduce_t reduce {}
template<kumi::concepts::projection_map auto Projections>
constexpr reindex_t< Projections > reindex {}
constexpr remove_t remove {}
template<std::size_t... I>
constexpr reorder_t< I... > reorder {}
template<kumi::concepts::identifier auto... Name>
constexpr reorder_fields_t< Name... > reorder_fields {}
constexpr reverse_t reverse {}
template<std::size_t R>
constexpr rotate_left_t< R > rotate_left {}
template<std::size_t R>
constexpr rotate_right_t< R > rotate_right {}
template<typename T>
constexpr std::size_t size_v = std::tuple_size<std::remove_cvref_t<T>>::value
 Computes the number of elements of a kumi::product_type.
constexpr split_t split {}
constexpr sum_t sum {}
constexpr tie_t tie {}
template<kumi::concepts::identifier auto... Fields>
constexpr tie_as_record_t< Fields... > tie_as_record {}
 Creates a kumi::record of lvalue references to its arguments.
template<std::size_t N, std::size_t O>
constexpr tiles_t< N, O > tiles {}
constexpr to_array_t to_array {}
constexpr to_record_t to_record {}
constexpr to_ref_t to_ref {}
constexpr to_tuple_t to_tuple {}
constexpr transpose_t transpose {}
constexpr unique_t unique {}
constexpr values_of_t values_of {}
template<std::size_t N>
constexpr tiles_t< N, 1 > windows {}
constexpr zip_t zip {}
constexpr zip_max_t zip_max {}
constexpr zip_min_t zip_min {}

Array deduction guides

 array () -> array< void, 0 >
 Deduction guide for the empty power type: kumi::array{} -> kumi::array<> (== array<void, 0>).
template<typename T, typename... Ts>
 array (T &&, Ts &&...) -> array< std::unwrap_ref_decay_t< T >, sizeof...(Ts)+1 >
 kumi::array deduction guide