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

Named wrapper over a type. More...

#include <kumi/detail/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 kumi::tuple.

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 name ()
 Name associated to the field.

(Note that these are not member symbols.)

template<_::identifier auto Name, typename T>
decltype(auto) constexpr capture_field (T &&t) noexcept
 Creates a field from a given value keeping the qualifiers.
template<typename U, typename T>
decltype(auto) constexpr field_cast (T &&t) noexcept
 Casts the provided value to the target type using static_cast.
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.