3#ifndef DUNE_COMMON_STD_TYPE_TRAITS_HH
4#define DUNE_COMMON_STD_TYPE_TRAITS_HH
62 template<
typename T >
78 template<
typename T >
82#if __cpp_lib_bool_constant
84 using std::bool_constant;
86#elif __cpp_lib_experimental_bool_constant
88 using std::experimental::bool_constant;
98 using bool_constant = std::integral_constant<bool, value>;
108 template<
class R,
class F,
class... Args,
110 std::is_same<
void_t<std::result_of_t<F(Args...)>>, R>::value
118 template<
class R,
class F,
class... Args,
120 std::is_convertible<std::result_of_t<F(Args...)>, R>::value
122 std::true_type is_callable_helper(PriorityTag<1>)
128 template<
class R,
class F,
class... Args>
129 std::false_type is_callable_helper(PriorityTag<0>)
148 template <
class D,
class R=
void>
166 template <
class F,
class... Args,
class R>
168 decltype(Imp::is_callable_helper<R, F, Args...>(PriorityTag<42>()))
Dune namespace.
Definition: alignment.hh:11
typename detail::voider< Types... >::type void_t
Is void for all valid input types (see N3911). The workhorse for C++11 SFINAE-techniques.
Definition: typetraits.hh:35
Helper class for tagging priorities.
Definition: typeutilities.hh:60
Traits class to check if function is callable.
Definition: type_traits.hh:149
template mapping a type to std::false_type
Definition: type_traits.hh:63
template mapping a type to std::true_type
Definition: type_traits.hh:79
Traits for type conversions and type information.
Utilities for type computations, constraining overloads, ...