r262952 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Jul 24 20:49:00 GMT 2018


Author: redi
Date: Tue Jul 24 20:49:10 2018
New Revision: 262952

URL: https://gcc.gnu.org/viewcvs?rev=262952&root=gcc&view=rev
Log:
PR libstdc++/86658 fix __niter_wrap to not copy invalid iterators

An output iterator passed as the unused first argument to __niter_wrap
might have already been invalidated, so don't copy it.

	PR libstdc++/86658
	* include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
	parameter by reference, to avoid copying invalid iterators.
	* testsuite/25_algorithms/copy/86658.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/25_algorithms/copy/86658.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/stl_algobase.h



More information about the Libstdc++-cvs mailing list