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

Callable object filtering a product type over a predicate. More...

Variables

template<template< typename > typename Pred>
constexpr filter_t< Pred > kumi::filter {}

Detailed Description

Callable object filtering a product type over a predicate.

Variable Documentation

◆ filter

template<template< typename > typename Pred>
filter_t<Pred> kumi::filter {}
inlineconstexprnodiscardnoexcept

On a record type, Pred is applied directly to the underlying elements of the fields.

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<template<typename> typename Pred, concepts::product_type T>
constexpr auto filter(T && t) noexcept;
}
Concept specifying a type follows the Product Type semantic.
Definition concepts.hpp:77
constexpr filter_t< Pred > filter
Definition partition.hpp:196
Main KUMI namespace.
Definition algorithm.hpp:11

Template Parameters

  • Pred: Compile-time predicate

Parameters

  • t: Product Type to process

Return value

  • A Product type containing all values of t whose types satisfy Pred.

Helper type

template<template<typename> typename Pred, kumi::concepts::product_type T>
using filter_t = decltype(kumi::filter<Pred>(kumi::declval<T>()));
template<template<typename> typename Pred, kumi::concepts::product_type T> struct filter
{
using type = kumi::result::filter_t<Pred, T>;
};

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

Examples