This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r262952 - in /trunk/libstdc++-v3: ChangeLog inc...
- From: redi at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Tue, 24 Jul 2018 20:49:11 -0000
- Subject: r262952 - in /trunk/libstdc++-v3: ChangeLog inc...
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