gcc/libstdc++-v3
Patrick Palka 144dfc68d0 libstdc++: Move-only input iterator support in <memory> algorithms (LWG 3355)
This adds support for move-only input iterators in the ranges::unitialized_*
algorithms defined in <memory>, as per LWG 3355.  The only changes needed are to
add calls to std::move in the appropriate places and to use operator- instead of
ranges::distance because the latter cannot be used with a move-only iterator
that has a sized sentinel, as is the case here.  (This issue with
ranges::distance is LWG 3392.)

libstdc++-v3/ChangeLog:

	LWG 3355 The memory algorithms should support move-only input iterators
	introduced by P1207
	* include/bits/ranges_uninitialized.h
	(__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
	to copy __ifirst, which could be a move-only input iterator.  Use
	operator- instead of ranges::distance to compute distance from a sized
	sentinel.
	(__uninitialized_copy_n_fn::operator()): Likewise.
	(__uninitialized_move_fn::operator()): Likewise.
	(__uninitialized_move_n_fn::operator()): Likewise.
	(__uninitialized_destroy_fn::operator()): Use std::move to avoid
	attempting to copy __first.
	(__uninitialized_destroy_n_fn::operator()): Likewise.
	* testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
	Augment test.
	* .../specialized_algorithms/uninitialized_copy/constrained.cc:
	Likewise.
	* .../specialized_algorithms/uninitialized_move/constrained.cc:
	Likewise.
2020-03-03 22:44:39 -05:00
..
config x32: Update baseline_symbols.txt 2020-03-01 06:13:28 -08:00
doc Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
include libstdc++: Move-only input iterator support in <memory> algorithms (LWG 3355) 2020-03-03 22:44:39 -05:00
libsupc++ libstdc++: Remove std::type_info::operator!= for C++20 2020-02-20 11:30:19 +00:00
po Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
python libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc 2020-02-17 13:20:57 +00:00
scripts Update copyright years. 2020-01-01 12:51:42 +01:00
src libstdc++ P1956R1 On the names of low-level bit manipulation functions 2020-02-17 17:09:18 +00:00
testsuite libstdc++: Move-only input iterator support in <memory> algorithms (LWG 3355) 2020-03-03 22:44:39 -05:00
acinclude.m4 libstdc++: Replace glibc-specific check for clock_gettime (PR 93325) 2020-01-28 13:24:09 +00:00
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
ChangeLog libstdc++: Move-only input iterator support in <memory> algorithms (LWG 3355) 2020-03-03 22:44:39 -05: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 Use a non-empty test program to test ability to link. 2020-02-12 13:22:07 -08:00
configure.ac
configure.host
crossconfig.m4 reject macros in math decl check 2020-01-23 16:44:54 -03:00
fragment.am
linkage.m4
Makefile.am Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
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.