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

Named wrapper over a type. More...

#include <kumi/utils/field.hpp>

Detailed Description

template<typename Id, typename T>
class kumi::field< Id, T >

Named wrapper over a type.

kumi::field provides a way to define named fields in a product type. Any type can be used as an identifier as long as it models kumi::concepts::identifier.

Template Parameters
Ida compile time string that is used to retrieve the field.
Tthe type of the value that is wrapped.

Static Public Member Functions

static constexpr auto label ()
 Name associated to the field.

(Note that these are not member symbols.)

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 CharT, typename Traits>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, field const &w) noexcept
 Inserts a kumi::field in an output stream.