gcc/libstdc++-v3/include/ext
Jonathan Wakely 386fd16c55 libstdc++: Make __int128 meet integer-class requirements [PR 96042]
Because __int128 can be used as the difference type for iota_view, we
need to ensure that it meets the requirements of an integer-class type.
The requirements in [iterator.concept.winc] p10 include numeric_limits
being specialized and giving meaningful answers. Currently we only
specialize numeric_limits for non-standard integer types in non-strict
modes.  However, nothing prevents us from defining an explicit
specialization for any implementation-defined type, so it doesn't matter
whether std::is_integral<__int128> is true or not.

This patch ensures that the numeric_limits specializations for signed
and unsigned __int128 are defined whenever __int128 is available. It
also makes the __numeric_traits and __int_limits helpers work for
__int128, via a new __gnu_cxx::__is_integer_nonstrict trait.

libstdc++-v3/ChangeLog:

	PR libstdc++/96042
	* include/ext/numeric_traits.h (__is_integer_nonstrict): New
	trait which is true for 128-bit integers even in strict modes.
	(__numeric_traits_integer, __numeric_traits): Use
	__is_integer_nonstrict instead of __is_integer.
	* include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
	(numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
	Define.
	* testsuite/std/ranges/iota/96042.cc: New test.
2020-08-19 16:49:07 +01:00
..
pb_ds Update copyright years. 2020-01-01 12:51:42 +01:00
algorithm Update copyright years. 2020-01-01 12:51:42 +01:00
aligned_buffer.h Update copyright years. 2020-01-01 12:51:42 +01:00
alloc_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
atomicity.h Update copyright years. 2020-01-01 12:51:42 +01:00
bitmap_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
cast.h Update copyright years. 2020-01-01 12:51:42 +01:00
cmath Update copyright years. 2020-01-01 12:51:42 +01:00
codecvt_specializations.h Update copyright years. 2020-01-01 12:51:42 +01:00
concurrence.h Update copyright years. 2020-01-01 12:51:42 +01:00
debug_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
enc_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
extptr_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
functional Update copyright years. 2020-01-01 12:51:42 +01:00
iterator Update copyright years. 2020-01-01 12:51:42 +01:00
malloc_allocator.h libstdc++: Avoid errors in allocator's noexcept-specifier (PR 89510) 2020-04-30 16:01:43 +01:00
memory Update copyright years. 2020-01-01 12:51:42 +01:00
mt_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
new_allocator.h libstdc++: Avoid errors in allocator's noexcept-specifier (PR 89510) 2020-04-30 16:01:43 +01:00
numeric Update copyright years. 2020-01-01 12:51:42 +01:00
numeric_traits.h libstdc++: Make __int128 meet integer-class requirements [PR 96042] 2020-08-19 16:49:07 +01:00
pod_char_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
pointer.h libstdc++: Add comparison operators to sequence containers 2020-04-17 23:41:04 +01:00
pool_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
random Update copyright years. 2020-01-01 12:51:42 +01:00
random.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
rb_tree Update copyright years. 2020-01-01 12:51:42 +01:00
rc_string_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
rope Update copyright years. 2020-01-01 12:51:42 +01:00
ropeimpl.h Update copyright years. 2020-01-01 12:51:42 +01:00
slist Update copyright years. 2020-01-01 12:51:42 +01:00
sso_string_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
stdio_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
stdio_sync_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
string_conversions.h Update copyright years. 2020-01-01 12:51:42 +01:00
throw_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
type_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
typelist.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring_fwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring_util.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring.tcc Update copyright years. 2020-01-01 12:51:42 +01:00