libstdc++ P1956R1 On the names of low-level bit manipulation functions
authorJonathan Wakely <jwakely@redhat.com>
Mon, 17 Feb 2020 16:03:48 +0000 (16:03 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 17 Feb 2020 17:09:18 +0000 (17:09 +0000)
commit9866abe31ec47f493ff40f525ad970bb60906c4b
tree99c716639b6082dfc556c43e9d3ce03121fb1034
parentcd23cdb1743b41baed0b937c4b359b9422490ca7
libstdc++ P1956R1 On the names of low-level bit manipulation functions

Implement this change for C++20 that was just approved in Prague.

P1956R1 On the names of low-level bit manipulation functions
* include/bits/hashtable_policy.h: Update comment.
* include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
(ispow2, ceil2, floor2, log2p1): Likewise.
(__cpp_lib_int_pow2): Add feature test macro.
* include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
* include/std/memory (assume_aligned): Adjust use of ispow2.
* include/std/version (__cpp_lib_int_pow2): Add.
* libsupc++/new_opa.cc: Adjust use of __ispow2.
* src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
* testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
* testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
* testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
* testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
* testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
* testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
19 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/std/bit
libstdc++-v3/include/std/charconv
libstdc++-v3/include/std/memory
libstdc++-v3/include/std/version
libstdc++-v3/libsupc++/new_opa.cc
libstdc++-v3/src/c++17/memory_resource.cc
libstdc++-v3/testsuite/17_intro/freestanding.cc
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/bit_width.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ceil2.cc [deleted file]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc [deleted file]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/floor2.cc [deleted file]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ispow2.cc [deleted file]
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/log2p1.cc [deleted file]