MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::Scalar Concept Reference

A type that behaves like a scalar value (arithmetic or custom number type), and describes itself through std::numeric_limits. More...

#include <scalar.hpp>

Concept definition

template<typename T>
concept mtl::Scalar = HasNumericLimits<T> && (std::is_arithmetic_v<T> || requires(T a, T b) {
{ a + b } -> std::convertible_to<T>;
{ a - b } -> std::convertible_to<T>;
{ a * b } -> std::convertible_to<T>;
{ -a } -> std::convertible_to<T>;
{ T{0} };
})
The number system describes itself through std::numeric_limits (#838): its epsilon,...
Definition scalar.hpp:22
A type that behaves like a scalar value (arithmetic or custom number type), and describes itself thro...
Definition scalar.hpp:27

Detailed Description

A type that behaves like a scalar value (arithmetic or custom number type), and describes itself through std::numeric_limits.