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;
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;
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:145
Dune namespace.
Definition: alignedallocator.hh:13