5 #ifndef DUNE_COMMON_MATRIXCONCEPTS_HH 6 #define DUNE_COMMON_MATRIXCONCEPTS_HH 11 #include <type_traits> 19 template<
class,
int,
int>
35 using IsMatrixHelper = std::void_t<decltype(std::declval<T>().N(), std::declval<T>().M())>;
42 constexpr
bool IsMatrix_v = Impl::IsMatrix<T>::value;
47 using IsStaticSizeMatrixHelper = std::void_t<decltype(T::rows, T::cols)>;
54 constexpr
bool IsStaticSizeMatrix_v = Impl::IsStaticSizeMatrix<T>::value;
59 class IsFieldMatrix :
public std::false_type {};
61 template<
class K,
int ROWS,
int COLS>
62 class IsFieldMatrix<
Dune::FieldMatrix<K, ROWS, COLS>> :
public std::true_type {};
66 constexpr
bool IsFieldMatrix_v = Impl::IsFieldMatrix<T>::value;
83 class IsDenseMatrix :
public std::false_type {};
86 class IsDenseMatrix<const T> :
public IsDenseMatrix<T> {};
88 template<
class K,
int ROWS,
int COLS>
89 class IsDenseMatrix<
Dune::FieldMatrix<K, ROWS, COLS>> :
public std::true_type {};
92 class IsDenseMatrix<
Dune::DynamicMatrix<K>> :
public std::true_type {};
96 constexpr
bool IsDenseMatrix_v = Impl::IsDenseMatrix<T>::value;
104 #endif // DUNE_COMMON_MATRIXCONCEPTS_HH typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition: type_traits.hh:141
Definition: bigunsignedint.hh:37
Dune namespace
Definition: alignedallocator.hh:12