kumi v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
Record Types and Functions

Definition for kumi::record class and functions. More...

Classes

class  kumi::record< Ts >
 Fixed-size collection of heterogeneous fields necessarily named, names are unique. More...

Friends

template<typename CharT, typename Traits>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, record const &t) noexcept
 Inserts a kumi::record in an output stream.

Comparison operators

template<typename... Us>
requires (concepts::named_equality_comparable<record, record<Us...>>)
constexpr auto operator== (record const &self, record< Us... > const &other) noexcept
 Compares a record with an other for equality.

Record Deduction Guides

template<typename... Ts>
KUMI_CUDA kumi::record (Ts &&...) -> record< std::unwrap_ref_decay_t< Ts >... >
 kumi::record deduction guide

Record construction

template<concepts::identifier auto... Fields, typename... Ts>
constexpr auto kumi::tie (Ts &... ts) -> record< field< decltype(Fields), Ts & >... >
 Creates a kumi::record of lvalue references to its arguments.
template<concepts::identifier auto... Fields, typename... Ts>
constexpr auto forward_as_record (Ts &&... ts) -> record< field< decltype(Fields), Ts && >... >
 Creates a kumi::record of forwarding references to its arguments.
template<typename... Ts>
constexpr auto make_record (Ts &&... ts) -> record< std::unwrap_ref_decay_t< Ts >... >
 Creates a record object, deducing the target type from the types of arguments.
template<concepts::record_type R>
constexpr auto to_ref (R &&r)
 Creates a kumi::record of references given a reference to a kumi::record_type.

Record conversion

template<concepts::record_type Type, typename... Ts>
constexpr auto from_record (record< Ts... > const &r)
 Converts a kumi::record to an instance of a type that models kumi::record_type.
template<concepts::record_type Type>
constexpr auto to_record (Type &&r)
 Converts a kumi::record_type to an instance kumi::record.

Accessors

template<std::size_t I, typename... Ts>
decltype(auto) constexpr get (record< Ts... > &r) noexcept
 Extracts the Ith field from a kumi::record.