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

abs(a) as generic code calls it: std::abs for the built-in types, and the number type's own abs found by ADL (#838: it was unqualified with no using std::abs, so Magnitude<double> held only through C's ::abs(int)). More...

#include <magnitude.hpp>

Concept definition

template<typename T>
concept mtl::detail::magnitude_adl::has_abs = requires(T a) {
{ abs(a) } -> std::convertible_to<magnitude_t<T>>;
}
abs(a) as generic code calls it: std::abs for the built-in types, and the number type's own abs found...
Definition magnitude.hpp:32
auto abs(const V &v)
Element-wise abs for vectors -> dense_vector<magnitude_t<T>>.
Definition abs.hpp:15

Detailed Description

abs(a) as generic code calls it: std::abs for the built-in types, and the number type's own abs found by ADL (#838: it was unqualified with no using std::abs, so Magnitude<double> held only through C's ::abs(int)).