macros.h (__glibcxx_check_can_increment_range): New.
authorFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 12 Jun 2018 20:18:35 +0000 (20:18 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 12 Jun 2018 20:18:35 +0000 (20:18 +0000)
commit84a9d3b6c1f1de2aa6b5bef700f51b2e7c0bc600
treedd213350f5abc1a75cfa15a2ac39eb4b0721edf6
parentdd9db6f897cbe85f830a5606435afe51961dbda8
macros.h (__glibcxx_check_can_increment_range): New.

2018-06-12  François Dumont  <fdumont@gcc.gnu.org>

* include/debug/macros.h (__glibcxx_check_can_increment_range): New.
(__glibcxx_check_can_decrement_range): New.
* include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
(__glibcxx_requires_can_decrement_range): New.
* include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
__glibcxx_requires_can_increment_range.
(std::move(_II, _II, _OI)): Likewise.
(std::copy_backward(_BI, _BI, _BI2)): Use
__glibcxx_requires_can_decrement_range.
(std::move_backward(_BI, _BI, _BI2)): Likewise.
* testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
* testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
* testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
* testsuite/25_algorithms/equal/debug/1_neg.cc: New.
* testsuite/25_algorithms/equal/debug/2_neg.cc: New.
* testsuite/25_algorithms/equal/debug/3_neg.cc: New.

From-SVN: r261525
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/debug/macros.h
libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/copy_backward/debug/3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/equal/debug/1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/equal/debug/2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/equal/debug/3_neg.cc [new file with mode: 0644]