Sequoia
|
class template for determining if a type is compatible with a floating-point type. More...
#include <TypeTraits.hpp>
class template for determining if a type is compatible with a floating-point type.
The goal is to forbid e.g. multiplication of a float by a double, but to allow multiplication of a float by an integral type, even though the latter operation may also lead to a loss of precision. Thus, for an instance x
of a type which both wraps a float and defines *=, this utility can be used to allow x *= 2 but forbid x *= 2.2. The idea is to strike a balance between ergonomics and loss of precision.