Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::ComplexCompatible Concept Reference

Concept: Type is suitable for complex arithmetic (can convert to/from double). More...

#include <complex_traits.hpp>

Concept definition

template<typename T>
concept sw::universal::ComplexCompatible = Arithmetic<T> && requires(T a, double d) {
{ static_cast<double>(a) } -> std::convertible_to<double>;
{ T(d) } -> std::convertible_to<T>;
}
Concept: Type supports basic arithmetic operations.
Definition complex_traits.hpp:19
Concept: Type is suitable for complex arithmetic (can convert to/from double).
Definition complex_traits.hpp:30

Detailed Description

Concept: Type is suitable for complex arithmetic (can convert to/from double).