5#ifndef DUNE_COMMON_MATRIXCONCEPTS_HH
6#define DUNE_COMMON_MATRIXCONCEPTS_HH
13#include <dune/common/std/type_traits.hh>
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;
71 class IsDenseMatrix :
public std::false_type {};
73 template<
class K,
int ROWS,
int COLS>
74 class IsDenseMatrix<
Dune::FieldMatrix<K, ROWS, COLS>> :
public std::true_type {};
77 class IsDenseMatrix<
Dune::DynamicMatrix<K>> :
public std::true_type {};
81 constexpr bool IsDenseMatrix_v = Impl::IsDenseMatrix<T>::value;
typename Impl::voider< Types... >::type void_t
Is void for all valid input types. The workhorse for C++11 SFINAE-techniques.
Definition: typetraits.hh:40
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition: type_traits.hh:141
Dune namespace.
Definition: alignedallocator.hh:13