gcc/libstdc++-v3/testsuite/26_numerics
Jonathan Wakely 4894d69a1f libstdc++: Add missing constraints to std::bit_cast [PR105027]
Our std::bit_cast was relying on the compiler to check for errors inside
__builtin_bit_cast, instead of checking them as constraints. That means
std::bit_cast was not SFINAE-friendly.

This fix uses a requires-clause, so for old versions of Clang without
concepts support the function will still be unconstrained. At some point
in future we can remove the #ifdef __cpp_concepts check and rely on all
compilers having full concepts support in C++20 mode.

libstdc++-v3/ChangeLog:

	PR libstdc++/105027
	* include/std/bit (bit_cast): Add constraints.
	* testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2022-03-23 12:17:16 +00:00
..
accumulate Update copyright years. 2022-01-03 10:42:10 +01:00
adjacent_difference Update copyright years. 2022-01-03 10:42:10 +01:00
bit libstdc++: Add missing constraints to std::bit_cast [PR105027] 2022-03-23 12:17:16 +00:00
complex Update copyright years. 2022-01-03 10:42:10 +01:00
endian Update copyright years. 2022-01-03 10:42:10 +01:00
exclusive_scan Update copyright years. 2022-01-03 10:42:10 +01:00
gcd Update copyright years. 2022-01-03 10:42:10 +01:00
headers Update copyright years. 2022-01-03 10:42:10 +01:00
inclusive_scan Update copyright years. 2022-01-03 10:42:10 +01:00
inner_product Update copyright years. 2022-01-03 10:42:10 +01:00
iota Update copyright years. 2022-01-03 10:42:10 +01:00
lcm Update copyright years. 2022-01-03 10:42:10 +01:00
lerp Update copyright years. 2022-01-03 10:42:10 +01:00
midpoint Update copyright years. 2022-01-03 10:42:10 +01:00
numbers Update copyright years. 2022-01-03 10:42:10 +01:00
partial_sum Update copyright years. 2022-01-03 10:42:10 +01:00
pstl/numeric_ops libstdc++: Replace hyphens in effective target keywords 2021-11-24 13:20:26 +00:00
random Update copyright years. 2022-01-03 10:42:10 +01:00
reduce Update copyright years. 2022-01-03 10:42:10 +01:00
slice Update copyright years. 2022-01-03 10:42:10 +01:00
slice_array Update copyright years. 2022-01-03 10:42:10 +01:00
transform_exclusive_scan Update copyright years. 2022-01-03 10:42:10 +01:00
transform_inclusive_scan Update copyright years. 2022-01-03 10:42:10 +01:00
transform_reduce Update copyright years. 2022-01-03 10:42:10 +01:00
valarray Update copyright years. 2022-01-03 10:42:10 +01:00