libstdc++: make negative count safe with std::for_each_n
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
Showing
Please
register
or
sign in
to comment