diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-12-03 19:17:13 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-12-03 19:17:13 +0000 |
commit | 9e433b3461ab64b38350817392a77efb67bb78b4 (patch) | |
tree | e7120a6f2ad5b0176b2325ceb078ef977673379c /gcc | |
parent | adbeeb198a2a00812a5cd2ff0a38d6243a590dd0 (diff) | |
download | gcc-9e433b3461ab64b38350817392a77efb67bb78b4.zip gcc-9e433b3461ab64b38350817392a77efb67bb78b4.tar.gz gcc-9e433b3461ab64b38350817392a77efb67bb78b4.tar.bz2 |
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions