gcc/libstdc++-v3
Jonathan Wakely 2a0f6c61b4 libstdc++: Fix weakly_incrementable to allow __int128 (PR 93267)
The __iota_diff_t alias can be the type __int128, but that does not
satisfy the signed_integral and __is_signed_integer_like concepts when
__STRICT_ANSI__ is defined (which is true for -std=c++2a).

Because weakly_incrementable is defined in terms of signed_integral, it
is not satisfied by __int128, which means iota_view's iterator doesn't
always satisfy input_or_output_iterator and so iota_view is not always a
range.

The solution is to define __max_size_type and __max_diff_type using
__int128, so that __is_signed_integer_like allows __int128, and then
make weakly_incrementable use __is_signed_integer_like instead of
signed_integral.

	PR libstdc++/93267
	* include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
	Move here from <bits/range_access.h> and define using __int128 when
	available.
	(__is_integer_like, __is_signed_integer_like): Move here from
	<bits/range_access.h>.
	(weakly_incrementable): Use __is_signed_integer_like.
	* include/bits/range_access.h (__max_diff_type, __max_size_type)
	(__is_integer_like, __is_signed_integer_like): Move to
	<bits/iterator_concepts.h>.
	(__make_unsigned_like_t): Move here from <ranges>.
	* include/std/ranges (__make_unsigned_like_t): Move to
	<bits/range_access.h>.
	(iota_view): Replace using-directive with using-declarations.
	* testsuite/std/ranges/iota/93267.cc: New test.
	* testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
2020-01-15 16:22:49 +00:00
..
config libstdc++: Define memory resource key functions non-inline (PR93208) 2020-01-09 13:18:20 +00:00
doc rename local _C2 identifiers in stl map header files 2020-01-09 23:00:50 +00:00
include libstdc++: Fix weakly_incrementable to allow __int128 (PR 93267) 2020-01-15 16:22:49 +00:00
libsupc++ libstdc++: Define __cpp_lib_three_way_comparison conditionally 2020-01-06 12:06:41 +00:00
po
python
scripts
src libstdc++: Define memory resource key functions non-inline (PR93208) 2020-01-09 13:18:20 +00:00
testsuite libstdc++: Fix weakly_incrementable to allow __int128 (PR 93267) 2020-01-15 16:22:49 +00:00
acinclude.m4
aclocal.m4
ChangeLog libstdc++: Fix weakly_incrementable to allow __int128 (PR 93267) 2020-01-15 16:22:49 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019 libstdc++: Fix whitespace in ChangeLog-2019 2020-01-09 21:31:35 +00:00
config.h.in
configure
configure.ac
configure.host
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.