Loading...
Searching...
No Matches
Dune::IsNumber< T > Struct Template Reference
Common » Numbers | Common » Utilities » C++ utilities and backports

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

`#include <dune/common/typetraits.hh>`

Inheritance diagram for Dune::IsNumber< T >:

## 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:

- bigunsignedint.hh