4894d69a1f
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. |
||
---|---|---|
.. | ||
accumulate | ||
adjacent_difference | ||
bit | ||
complex | ||
endian | ||
exclusive_scan | ||
gcd | ||
headers | ||
inclusive_scan | ||
inner_product | ||
iota | ||
lcm | ||
lerp | ||
midpoint | ||
numbers | ||
partial_sum | ||
pstl/numeric_ops | ||
random | ||
reduce | ||
slice | ||
slice_array | ||
transform_exclusive_scan | ||
transform_inclusive_scan | ||
transform_reduce | ||
valarray |