https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93121
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:9e433b3461ab64b38350817392a77efb67bb78b4 commit r11-5722-g9e433b3461ab64b38350817392a77efb67bb78b4 Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Dec 3 19:17:13 2020 +0000 libstdc++: Add std::bit_cast for C++20 [PR 93121] Thanks to Jakub's addition of the built-in, we can add this to the library now. The compiler tests for the built-in are quite extensive, including verifying the constraints, so this only adds minimal tests to the library testsuite. This doesn't add a new _GLIBCXX_HAVE_BUILTIN_BIT_CAST because using __has_builtin(__builtin_bit_cast) works for GCC and versions of Clang that provide the built-in. libstdc++-v3/ChangeLog: PR libstdc++/93121 * include/std/bit (__cpp_lib_bit_cast, bit_cast): Define. * include/std/version (__cpp_lib_bit_cast): Define. * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: New test. * testsuite/26_numerics/bit/bit.cast/version.cc: New test.