llvm-project/libcxx/test/std/numerics/bit
Arthur O'Dwyer e130fbe24e [libc++] Some fixes to the <bit> utilities.
Fix __bitop_unsigned_integer and rename to __libcpp_is_unsigned_integer.
There are only five unsigned integer types, so we should just list them out.
Also provide `__libcpp_is_signed_integer`, even though the Standard doesn't
consume that trait anywhere yet.

Notice that `concept uniform_random_bit_generator` is specifically specified
to rely on `concept unsigned_integral` and *not* `__is_unsigned_integer`.
Instantiating `std::ranges::sample` with a type `U` satisfying
`uniform_random_bit_generator` where `unsigned_integral<U::result_type>`
and not `__is_unsigned_integer<U::result_type>` is simply IFNDR.

Orthogonally, fix an undefined behavior in std::countr_zero(__uint128_t).

Orthogonally, improve tests for the <bit> manipulation functions.
It was these new tests that detected the bug in countr_zero.

Differential Revision: https://reviews.llvm.org/D102328
2021-05-18 19:56:30 -04:00
..
bit.endian [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
bit.pow.two [libc++] Some fixes to the <bit> utilities. 2021-05-18 19:56:30 -04:00
bitops.count [libc++] Some fixes to the <bit> utilities. 2021-05-18 19:56:30 -04:00
bitops.rot [libc++] Some fixes to the <bit> utilities. 2021-05-18 19:56:30 -04:00