[committed] libstdc++: Add std::bit_cast for C++20 [PR 93121]
Jonathan Wakely
jwakely@redhat.com
Thu Dec 3 19:32:00 GMT 2020
On 03/12/20 19:25 +0000, Jonathan Wakely wrote:
>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.
This fixes some typos in the new tests.
Tested x86_64-linux. Committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1786 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20201203/fee199a0/attachment.bin>
More information about the Libstdc++
mailing list