Dune Core Modules (2.6.0)

Dune::IsNumber< T > Struct Template Reference

Whether this type acts as a scalar in the context of (hierarchically blocked) containers. More...

#include <dune/common/typetraits.hh>

Detailed Description

template<typename T>
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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 19, 22:31, 2024)