libstdc++: Improve _GLIBCXX_DEBUG __valid_range check
authorFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 24 Nov 2019 17:09:44 +0000 (17:09 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 24 Nov 2019 17:09:44 +0000 (17:09 +0000)
commitaf4e8d4d5aa3a13bc9e2a8aa50341043e8ad6c61
treed2ed480c1b521252fc2ec2c54b252c09b966866f
parent74b9f8dfe18b51280ecb9b68e0de7d4f7e36e973
libstdc++: Improve _GLIBCXX_DEBUG __valid_range check

Adds iterator singular check within the valid range check.

* include/debug/functions.h: Remove <bits/move.h> include.
(__check_singular_aux, __check_singular): Move...
* include/debug/helper_functions.h:
(__check_singular_aux, __check_singular): ...here.
(__valid_range_aux): Adapt to use latter.
Add <bits/move.h> include.
* testsuite/25_algorithms/copy/debug/2_neg.cc: New.

From-SVN: r278658
libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/functions.h
libstdc++-v3/include/debug/helper_functions.h
libstdc++-v3/testsuite/25_algorithms/copy/debug/2_neg.cc [new file with mode: 0644]