This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/71771] DR 685 applied incorrectly
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Aug 2016 10:13:58 +0000
- Subject: [Bug libstdc++/71771] DR 685 applied incorrectly
- Auto-submitted: auto-generated
- References: <bug-71771-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71771
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Aug 23 10:13:26 2016
New Revision: 239691
URL: https://gcc.gnu.org/viewcvs?rev=239691&root=gcc&view=rev
Log:
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.
Added:
trunk/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++11.cc
trunk/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++14.cc
- copied, changed from r239690,
trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/greedy_ops.cc
trunk/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++17.cc
trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc
- copied, changed from r239690,
trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/greedy_ops.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_iterator.h
trunk/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis.cc
trunk/libstdc++-v3/testsuite/24_iterators/move_iterator/greedy_ops.cc
trunk/libstdc++-v3/testsuite/24_iterators/reverse_iterator/greedy_ops.cc