aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-03-23 09:57:20 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-03-23 12:17:16 +0000
commit4894d69a1f37d54b6a612e58053db477ff5ba832 (patch)
treec28015e1136893a110e0ef71075f312d8957209a /gcc
parent018805e2791bafb40f8937d371d31325b037880d (diff)
downloadgcc-4894d69a1f37d54b6a612e58053db477ff5ba832.zip
gcc-4894d69a1f37d54b6a612e58053db477ff5ba832.tar.gz
gcc-4894d69a1f37d54b6a612e58053db477ff5ba832.tar.bz2
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions