gcc/libstdc++-v3/testsuite/26_numerics
Jonathan Wakely 47f7905440 Add new helper traits for signed/unsigned integer types
Reuse the __is_one_of alias in additional places, and define traits to
check for signed/unsigned integer types so we don't have to duplicate
those checks elsewhere.

The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.

	* include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
	* include/std/bit (_If_is_unsigned_integer_type): Remove.
	(_If_is_unsigned_integer): Use __is_unsigned_integer.
	(rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
	(countl_one(byte), countr_zero(byte), countr_one(byte))
	(popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
	(log2p1(byte)): Remove.
	* include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
	(__detail::__is_int_to_chars_type): Remove.
	(__detail::__integer_to_chars_result_type): Use __is_signed_integer
	and __is_unsigned_integer.
	* include/std/type_traits (__is_one_of): Move here from <charconv>.
	(__is_signed_integer, __is_unsigned_integer): New helpers.
	* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
	std::byte overload.
	* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
	* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
	* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.

From-SVN: r272695
2019-06-26 15:38:23 +01:00
..
accumulate Update copyright years. 2019-01-01 13:31:55 +01:00
adjacent_difference Update copyright years. 2019-01-01 13:31:55 +01:00
bit Add new helper traits for signed/unsigned integer types 2019-06-26 15:38:23 +01:00
complex Fix tests that fail with -std=gnu++98 or -std=gnu++11 2019-06-06 13:13:42 +01:00
exclusive_scan Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
gcd Fix std::midpoint for denormal values 2019-06-24 13:09:51 +01:00
headers In C++17 <math.h> should not put special functions in global namespace 2019-03-21 14:03:56 +00:00
inclusive_scan Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
inner_product Update copyright years. 2019-01-01 13:31:55 +01:00
iota Update copyright years. 2019-01-01 13:31:55 +01:00
lcm Fix std::midpoint for denormal values 2019-06-24 13:09:51 +01:00
midpoint Fix std::midpoint for denormal values 2019-06-24 13:09:51 +01:00
partial_sum Update copyright years. 2019-01-01 13:31:55 +01:00
pstl/numeric_ops Synchronize libstdc++ PSTL with upstream LLVM PSTL 2019-06-07 22:01:16 +00:00
random Fix random_device to work with COW strings again 2019-05-31 11:34:53 +01:00
reduce Fix value category bugs in std::reduce 2019-06-19 16:29:49 +01:00
slice Update copyright years. 2019-01-01 13:31:55 +01:00
slice_array Update copyright years. 2019-01-01 13:31:55 +01:00
transform_exclusive_scan Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
transform_inclusive_scan Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
transform_reduce Implement new serial algorithms from Parallelism TS (P0024R2) 2019-06-19 00:01:16 +01:00
valarray Update copyright years. 2019-01-01 13:31:55 +01:00
lerp.cc Define midpoint and lerp functions for C++20 (P0811R3) 2019-03-05 18:37:24 +00:00