gcc/libstdc++-v3/testsuite/26_numerics
Jonathan Wakely e0c3066c14
libstdc++: Support std::abs for 128-bit integers and floats [PR96710]
Currently we only provide std::abs(__int128) and std::abs(__float128)
for non-strict modes, i.e. -std=gnu++NN but not -std=c++NN.

This defines those overloads for strict modes too, as a small step
towards resolving PR 96710 (which will eventually mean that __int128
satisfies the std::integral concept).

libstdc++-v3/ChangeLog:

	PR libstdc++/96710
	* include/bits/std_abs.h [__SIZEOF_INT128__] (abs(__int128)):
	Define.
	[_GLIBCXX_USE_FLOAT128] (abs(__float128)): Enable definition for
	strict modes.
	* testsuite/26_numerics/headers/cmath/82644.cc: Use strict_std
	instead of defining __STRICT_ANSI__.
	* testsuite/26_numerics/headers/cstdlib/abs128.cc: New test.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-05-27 12:11:43 +01:00
..
accumulate Update copyright years. 2025-01-02 11:59:57 +01:00
adjacent_difference Update copyright years. 2025-01-02 11:59:57 +01:00
bit Update copyright years. 2025-01-02 11:59:57 +01:00
complex libstdc++: Deprecate non-standard std::fabs(const complex<T>&) [PR120235] 2025-05-15 16:33:16 +01:00
endian Update copyright years. 2025-01-02 11:59:57 +01:00
exclusive_scan Update copyright years. 2025-01-02 11:59:57 +01:00
gcd Update copyright years. 2025-01-02 11:59:57 +01:00
headers libstdc++: Support std::abs for 128-bit integers and floats [PR96710] 2025-05-27 12:11:43 +01:00
inclusive_scan Update copyright years. 2025-01-02 11:59:57 +01:00
inner_product Update copyright years. 2025-01-02 11:59:57 +01:00
iota Update copyright years. 2025-01-02 11:59:57 +01:00
lcm Update copyright years. 2025-01-02 11:59:57 +01:00
lerp Update copyright years. 2025-01-02 11:59:57 +01:00
midpoint Update copyright years. 2025-01-02 11:59:57 +01:00
numbers Update copyright years. 2025-01-02 11:59:57 +01:00
partial_sum Update copyright years. 2025-01-02 11:59:57 +01:00
pstl/numeric_ops libstdc++: Fix <numeric> parallel algos for move-only values [PR117905] 2025-05-06 17:19:26 +01:00
random libstdc++: Use constexpr-if for C++11 and C++14 2025-04-29 10:52:59 +01:00
reduce Update copyright years. 2025-01-02 11:59:57 +01:00
saturation libstdc++: Define C++26 saturation arithmetic functions (P0543R3) 2023-11-17 15:28:30 +00:00
slice Update copyright years. 2025-01-02 11:59:57 +01:00
slice_array Update copyright years. 2025-01-02 11:59:57 +01:00
stdckdint libstdc++: Implement <stdckdint.h> for C++26 (P3370R1) 2025-03-13 14:45:38 +00:00
transform_exclusive_scan Update copyright years. 2025-01-02 11:59:57 +01:00
transform_inclusive_scan Update copyright years. 2025-01-02 11:59:57 +01:00
transform_reduce Update copyright years. 2025-01-02 11:59:57 +01:00
valarray Update copyright years. 2025-01-02 11:59:57 +01:00