12#ifndef DUMUX_COMMON_OPTIONAL_SCALAR_HH
13#define DUMUX_COMMON_OPTIONAL_SCALAR_HH
28 static_assert(std::numeric_limits<T>::has_quiet_NaN,
"T has to be able to represent a quiet NaN!");
39 explicit operator bool()
const
42 return !isnan(value_);
45 T value_ = std::numeric_limits<T>::quiet_NaN();
A type for an optional scalar (contains either a valid number or NaN)
Definition: optionalscalar.hh:27
OptionalScalar(T value)
Definition: optionalscalar.hh:32
T value() const
Definition: optionalscalar.hh:36