Implement resolution of LWG DR 685 precisely
authorJonathan Wakely <jwakely@redhat.com>
Tue, 23 Aug 2016 10:13:26 +0000 (11:13 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 23 Aug 2016 10:13:26 +0000 (11:13 +0100)
commitb405d54fcd60126cd14ffe71142a9066d34b009d
tree8f1e862f81e10c13ee501a67012876febfc18151
parent06db992005654ed7993b9f7696e2c34751f82db2
Implement resolution of LWG DR 685 precisely

PR libstdc++/71771
* include/bits/stl_iterator.h
(operator-(reverse_iterator<Iter>, reverse_iterator<Iter>): Only
define for C++98 mode.
(operator-(move_iterator<Iter>, move_iterator<Iter>): Don't define.
* testsuite/24_iterators/headers/iterator/synopsis.cc: Use
-std=gnu++98.
* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc: New test.
* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc: New test.
* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: New test.
* testsuite/24_iterators/move_iterator/greedy_ops.cc: Don't test
difference operator.
* testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Only test
difference operator for C++98.
* testsuite/24_iterators/reverse_iterator/71771.cc: New test.

From-SVN: r239691
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/move_iterator/greedy_ops.cc
libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc [new file with mode: 0644]
libstdc++-v3/testsuite/24_iterators/reverse_iterator/greedy_ops.cc