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::Arithmetic Concept Reference

Concept: Type supports basic arithmetic operations. More...

#include <complex_traits.hpp>

Concept definition

template<typename T>
concept sw::universal::Arithmetic = requires(T a, T b) {
{ a + b } -> std::convertible_to<T>;
{ a - b } -> std::convertible_to<T>;
{ a * b } -> std::convertible_to<T>;
{ a / b } -> std::convertible_to<T>;
{ -a } -> std::convertible_to<T>;
{ T{} };
}
Concept: Type supports basic arithmetic operations.
Definition complex_traits.hpp:19

Detailed Description

Concept: Type supports basic arithmetic operations.