stl_algo.h
214 KB
-
libstdc++: make negative count safe with std::for_each_n · 3a99fd4d
The Library Working Group have approved a change to std::for_each_n that requires it to handle negative N gracefully, which we were not doing for random access iterators. * include/bits/stl_algo.h (for_each_n): Handle negative count. * testsuite/25_algorithms/for_each/for_each_n_debug.cc: New test. From-SVN: r277932
Jonathan Wakely committed