Dune Core Modules (2.6.0)
Whether this type acts as a scalar in the context of (hierarchically blocked) containers. More...
#include <dune/common/typetraits.hh>
Detailed Description
struct Dune::IsNumber< T >
Whether this type acts as a scalar in the context of (hierarchically blocked) containers.
All types T
for which IsNumber<T>::value
is true
will act as a scalar when used with possibly hierarchically blocked containers, such as FieldMatrix
, FieldVector
, BCRSMatrix
, BlockVector
, MultiTypeBlockVector
, etc. This enables earlier error reporting when implementing binary container-scalar operators, such as =
or *=
.
By default is true
for all arithmetic types (as per std::is_arithmetic
), and for T=std::complex<U>
, iff IsNumber<U>::value
itself is true
.
Should be specialized to true
for e.g. extended precision types or automatic differentiation types, or anything else that might sensibly be an element of a matrix or vector.
The documentation for this struct was generated from the following file:
- dune/common/typetraits.hh