[PATCH] Adjust std::rotl, std::rotr etc to match final P0553R4 proposal

Jonathan Wakely jwakely@redhat.com
Mon Jul 22 16:58:00 GMT 2019


On 22/07/19 17:55 +0100, Jonathan Wakely wrote:
>This proposal has now been accepted for C++20, with a few changes. This
>patch adjusts std::rotl and std::rotr to match the final specification
>and declares the additions for C++2a mode even when __STRICT_ANSI__ is
>defined.
>
>	* include/std/bit (__rotl, __rotr): Change second parameter from
>	unsigned int to int and handle negative values.
>	(rotl, rotr): Remove check for __STRICT_ANSI__. Change second
>	parameter from unsigned int to int. Add nodiscard attribute.
>	* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
>	* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
>	shifts.
>	* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
>	* testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
>	shifts.

This patch applies some more testsuite renaming.

Tested x86_64-linux, committed to trunk.

I'll backport this to gcc-9-branch too.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2181 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190722/847c264e/attachment.bin>


More information about the Libstdc++ mailing list