KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches

◆ apply_field

apply_field_t kumi::apply_field {}
inlineconstexprnoexcept

Callable object invoking the callable object f with the elements of the product type unrolled as arguments.

f is applied on the fields when the input t is a record type.

Note
This function does not take part in overload resolution if f can't be applied to the elements of t.

Header file

#include <kumi/algorithm/apply.hpp>

Call Signature

template<typename Function, product_type T>
constexpr decltype(auto) apply_field(Function && f, T && t) noexcept;
constexpr apply_field_t apply_field
Callable object invoking the callable object f with the elements of the product type unrolled as argu...
Definition apply.hpp:146

Parameters

  • f: Callable object to be invoked
  • t: Product Type whose elements are used as arguments to f

Return value

  • The value returned by f.

Helper type

template<typename Function, kumi::concepts::record_type R> struct apply_field
{
using type = decltype(kumi::apply_field(std::declval<Function>(), std::declval<R>()));
};
template<typename Function, concepts::record_type R> using apply_field_t = typename apply_field<Function, R>::type;

Computes the return type of a call to kumi::apply_field

Example

Record