kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches
kumi::field_capture< ID, T > Class Template Reference

Named wrapper over a type. More...

#include <kumi/detail/field_capture.hpp>

Detailed Description

template<str ID, typename T>
class kumi::field_capture< ID, T >

Named wrapper over a type.

kumi::field_capture 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.

Public Types

using type = T
 Underlying type of a field_capture.
 

Static Public Attributes

static constexpr auto name = ID
 Name associated to the field_capture.
 

Related Symbols

(Note that these are not member symbols.)

template<str Name, typename T >
decltype(auto) constexpr capture_field (T &&t) noexcept
 Creates a field_capture from a given value keeping the qualifiers.
 
template<typename T >
decltype(auto) constexpr field_value_of (T &&t) noexcept
 Extracts the value from a kumi::field_capture or returns the parameter.
 
template<typename T >
constexpr auto name_of (as< T >) noexcept
 Extracts the value from a kumi::field_capture or returns the parameter.
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, field_capture const &w) noexcept
 Inserts a kumi::field_capture in an output stream.