26#ifndef DUMUX_TYPETRAITS_ISVALID_HH
27#define DUMUX_TYPETRAITS_ISVALID_HH
37template <
typename Expression>
38struct ValidityTestFunctor
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>
62 constexpr auto operator() (
const Argument& arg)
const
63 {
return testArgument_<Argument>(
int()); }
66 template <
typename Argument>
67 constexpr auto check ()
const
68 {
return testArgument_<Argument>(
int()); }
92template <
typename Expression>
93constexpr auto isValid(
const Expression& t)
94{
return Impl::ValidityTestFunctor<Expression>(); }
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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