function template · 15 overloads
std::abs
- Header
<complex>also in<cinttypes>,<cmath>,<cstdlib>,<valarray>- Draft
- [c.math.abs]
- Scope
std- cppreference
- std::abs
Overloads
- (1)
template<class T> requires abs-unsigned-unpromotable<T> void abs(T) = delete; - (2)
template<class T = /* implementation-defined */> requires abs-int128<T> constexpr T abs(T j) noexcept; - (3)
template<class T = /* implementation-defined */> requires fp-is<T, bfloat16> constexpr T abs(T x) noexcept; - (4)
template<class T = /* implementation-defined */> requires fp-is<T, float16> constexpr T abs(T x) noexcept; - (5)
template<class T = /* implementation-defined */> requires fp-is<T, float32> constexpr T abs(T x) noexcept; - (6)
template<class T = /* implementation-defined */> requires fp-is<T, float64> constexpr T abs(T x) noexcept; - (7)
template<class T = /* implementation-defined */> requires fp-is<T, y-float128> constexpr T abs(T x) noexcept; - (8)
template<class T = double> requires fp-is<T, double> constexpr T abs(T x) noexcept; - (9)
template<class T = float> requires fp-is<T, float> constexpr T abs(T x) noexcept; - (10)
template<class T = long double> requires fp-is<T, long double> constexpr T abs(T x) noexcept; - (11)
template<class = void> constexpr int abs(int j) noexcept; - (12)
template<class = void> constexpr long abs(long j) noexcept; - (13)
template<class = void> constexpr long long abs(long long j) noexcept; - (14)
template<class T> constexpr T abs(const complex<T>& x); - (15)
template<class T> valarray<T> abs(const valarray<T>& x);