KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::internal::FilterOut< Predicate, Head, Tail... > Struct Template Reference

Specialization of template class used to filter a list of (buffer-)types and discard those for which The template is recursively instantiated to check one type after the other and "insert" it into a std::tuple if it meets the criteria . based on https://stackoverflow.com/a/18366475. More...

#include <named_parameter_filtering.hpp>

Public Types

using non_ref_first = std::remove_reference_t<Head>
 Remove potential reference from Head.
 
using type
 

Static Public Attributes

static constexpr bool discard_elem
 Predicate which Head has to fulfill to be kept.
 
static constexpr auto ptype = parameter_type_v<Head>
 ParameterType stored as a static variable in Head.
 

Detailed Description

template<typename Predicate, typename Head, typename... Tail>
struct kamping::internal::FilterOut< Predicate, Head, Tail... >

Specialization of template class used to filter a list of (buffer-)types and discard those for which The template is recursively instantiated to check one type after the other and "insert" it into a std::tuple if it meets the criteria . based on https://stackoverflow.com/a/18366475.

Template Parameters
PredicatePredicate function which has a constexpr static member function discard() taking
Headas template parameter and returning a bool indiciating whether head shall be discard (filtered out).
HeadType for which it is checked whether it meets the predicate.
TailTypes that are checked later on during the recursive instantiation.

Member Typedef Documentation

◆ type

template<typename Predicate , typename Head , typename... Tail>
using kamping::internal::FilterOut< Predicate, Head, Tail... >::type
Initial value:
std::conditional_t<
typename FilterOut<Predicate, Tail...>::type,
typename PrependType<
std::integral_constant<parameter_type_t<Head>, ptype>,
typename FilterOut<Predicate, Tail...>::type>::type>
std::conditional_t< discard_elem, typename FilterOut< Predicate, Tail... >::type, typename PrependType< std::integral_constant< parameter_type_t< Head >, ptype >, typename FilterOut< Predicate, Tail... >::type >::type > type
Definition named_parameter_filtering.hpp:70
static constexpr auto ptype
ParameterType stored as a static variable in Head.
Definition named_parameter_filtering.hpp:69
static constexpr bool discard_elem
Predicate which Head has to fulfill to be kept.
Definition named_parameter_filtering.hpp:67

A std::tuple<T1, ..., Tn> where T1, ..., Tn are those types among Head, Tail... which fulfill the predicate.

Member Data Documentation

◆ discard_elem

template<typename Predicate , typename Head , typename... Tail>
constexpr bool kamping::internal::FilterOut< Predicate, Head, Tail... >::discard_elem
staticconstexpr
Initial value:
=
Predicate::template discard<non_ref_first>()

Predicate which Head has to fulfill to be kept.


The documentation for this struct was generated from the following file: