26#ifndef DUMUX_TYPETRAITS_ISVALID_HH
27#define DUMUX_TYPETRAITS_ISVALID_HH
37template <
typename Expression>
48 template <
typename Argument>
49 constexpr auto testArgument_(
int )
const
50 ->
decltype(std::declval<Expression>()(std::declval<Argument>()), std::true_type())
51 {
return std::true_type(); }
54 template <
typename Argument>
55 constexpr std::false_type testArgument_(...)
const
56 {
return std::false_type(); }
61 template <
typename Argument>
63 {
return testArgument_<Argument>(
int()); }
66 template <
typename Argument>
68 {
return testArgument_<Argument>(
int()); }
92template <
typename Expression>
93constexpr auto isValid(
const Expression& t)
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition: isvalid.hh:93
Definition: isvalid.hh:39
constexpr auto operator()(const Argument &arg) const
Definition: isvalid.hh:62
constexpr auto check() const
Definition: isvalid.hh:67