Concept defining requirements for scalar types used as GUM_SCALAR.
More...
#include <concepts.h>
template< typename T >
|| (
std::copyable< T > && std::movable< T > &&
std::default_initializable< T > &&
std::constructible_from< T, int > && std::constructible_from< T, double > &&
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 += b } -> std::same_as< T& >;
{ a *= b } -> std::same_as< T& >;
{ -a } -> std::convertible_to< T >;
} &&
std::totally_ordered< T >)
Concept defining requirements for scalar types used as GUM_SCALAR.
Concept defining requirements for scalar types used as GUM_SCALAR.
A type satisfies IsGumScalar if it supports:
- Arithmetic operations (+, -, *, /, +=, *=)
- Comparison operators (<, >, ==)
- std::numeric_limits specialization (min, max, infinity)
- Construction from numeric literals (int, double)
- Copyable and movable semantics
This concept is designed for types like double, float, or custom numeric types. It explicitly excludes complex container types like those derived from MultiDimImplementation, which are containers of scalars rather than scalars themselves.
- Template Parameters
-
- Note
- Built-in arithmetic types (double, float, int) automatically satisfy this concept via the std::is_arithmetic_v check.
Definition at line 98 of file concepts.h.