3#ifndef DUNE_COMMON_STD_TYPE_TRAITS_HH
4#define DUNE_COMMON_STD_TYPE_TRAITS_HH
10#if DUNE_HAVE_HEADER_EXPERIMENTAL_TYPE_TRAITS
11#include <experimental/type_traits>
78 template<
typename T >
96 template<
typename T >
100#if DUNE_HAVE_CXX_BOOL_CONSTANT
104#elif DUNE_HAVE_CXX_EXPERIMENTAL_BOOL_CONSTANT
117 template <
bool value>
128 template<
class R,
class F,
class... Args,
130 std::is_same<
void_t<std::result_of_t<F(Args...)>>, R>::value
138 template<
class R,
class F,
class... Args,
140 std::is_convertible<std::result_of_t<F(Args...)>, R>::value
148 template<
class R,
class F,
class... Args>
170 template <
class D,
class R=
void>
190 template <
class F,
class... Args,
class R>
192 decltype(Impl::is_callable_helper<R, F, Args...>(PriorityTag<42>()))
209 template <
class F,
class... Args>
211 decltype(Impl::is_callable_helper<void, F, Args...>(PriorityTag<42>()))
229 template <
class R,
class F,
class... Args>
231 decltype(Impl::is_callable_helper<R, F, Args...>(PriorityTag<42>()))
235#if DUNE_HAVE_CXX_EXPERIMENTAL_IS_DETECTED
237 using std::experimental::nonesuch;
258 template<
typename Default,
typename Void,
template<
typename...>
class Op,
typename... Args>
261 using value_t = std::false_type;
262 using type = Default;
266 template<
typename Default,
template<
typename...>
class Op,
typename... Args>
267 struct detector<Default,
void_t<Op<Args...>>, Op, Args...>
269 using value_t = std::true_type;
270 using type = Op<Args...>;
291 void operator=(
const nonesuch&) =
delete;
326 template<
typename Default,
template<
typename...>
class Op,
typename... Args>
339 template<
template<
typename...>
class Op,
typename... Args>
342#ifdef __cpp_variable_templates
353 template<
template<
typename...>
class Op,
typename... Args>
368 template<
template<
typename...>
class Op,
typename... Args>
383 template<
typename Default,
template<
typename...>
class Op,
typename... Args>
393 template<
typename Expected,
template<
typename...>
class Op,
typename... Args>
396#ifdef __cpp_variable_templates
404 template<
typename Expected,
template<
typename...>
class Op,
typename... Args>
415 template<
typename Target,
template<
typename...>
class Op,
typename... Args>
418#ifdef __cpp_variable_templates
426 template<
typename Target,
template<
typename...>
class Op,
typename... Args>
444 template<
class... B >
457 template<
class B1,
class... Bn >
458 struct conjunction< B1, Bn... >
459 : std::conditional_t< static_cast< bool >( B1::value ), conjunction< Bn... >, B1 >
474 template<
class... B >
487 template<
class B1,
class... Bn >
488 struct disjunction< B1, Bn... >
489 : std::conditional_t< static_cast< bool >( B1::value ), B1, disjunction< Bn... > >
constexpr bool is_detected_exact_v
Convenient access to the result value of is_detected_exact.
Definition: type_traits.hh:405
constexpr bool is_detected_convertible_v
Convenient access to the result value of is_detected_convertible.
Definition: type_traits.hh:427
std::integral_constant< bool, value > bool_constant
A template alias for std::integral_constant<bool, value>
Definition: type_traits.hh:118
typename detected_or< Default, Op, Args... >::type detected_or_t
Returns Op<Args...> if that is valid; otherwise returns the fallback type Default.
Definition: type_traits.hh:384
std::is_same< Expected, detected_t< Op, Args... > > is_detected_exact
Checks whether Op<Args...> is Expected without causing an error if Op<Args...> is invalid.
Definition: type_traits.hh:394
typename detected_or< nonesuch, Op, Args... >::type detected_t
Returns Op<Args...> if that is valid; otherwise returns nonesuch.
Definition: type_traits.hh:369
typename Impl::voider< Types... >::type void_t
Is void for all valid input types (see N3911). The workhorse for C++11 SFINAE-techniques.
Definition: typetraits.hh:40
constexpr bool is_detected_v
Detects whether Op<Args...> is valid and makes the result available as a value.
Definition: type_traits.hh:354
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition: type_traits.hh:340
Impl::detector< Default, void, Op, Args... > detected_or
Detects whether Op<Args...> is valid and makes the result available.
Definition: type_traits.hh:327
std::is_convertible< Target, detected_t< Op, Args... > > is_detected_convertible
Checks whether Op<Args...> is convertible to Target without causing an error if Op<Args....
Definition: type_traits.hh:416
Dune namespace.
Definition: alignedallocator.hh:14
Helper class for tagging priorities.
Definition: typeutilities.hh:85
Helper class for tagging priorities.
Definition: typeutilities.hh:71
forms the logical conjunction of the type traits B...
Definition: type_traits.hh:445
forms the logical disjunction of the type traits B...
Definition: type_traits.hh:475
Traits class to check if function is callable.
Definition: type_traits.hh:171
Traits class to check if function is invocable and the return type is compatible.
Definition: type_traits.hh:232
Traits class to check if function is invocable.
Definition: type_traits.hh:212
forms the logical negation of the type traits B...
Definition: type_traits.hh:504
Type representing a lookup failure by std::detected_or and friends.
Definition: type_traits.hh:287
template mapping a type to std::false_type
Definition: type_traits.hh:79
template mapping a type to std::true_type
Definition: type_traits.hh:97
Traits for type conversions and type information.
Utilities for type computations, constraining overloads, ...