1 // Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
18 // { dg-options "-std=gnu++2a" }
19 // { dg-do compile { target c++2a } }
25 // No nested reference and pointer types.
26 // No iterator_category.
28 // cpp17-iterator requirements:
29 int& operator*() const;
30 bidi_iterator
& operator++();
31 bidi_iterator
operator++(int);
33 // cpp17-input-iterator requirements:
34 friend bool operator==(const bidi_iterator
&, const bidi_iterator
&);
35 using difference_type
= long long;
36 using value_type
= int;
38 // cpp17-forward-iterator requirements:
41 // cpp17-bidirectional-iterator requirements:
42 bidi_iterator
& operator--();
43 bidi_iterator
operator--(int);
50 // Missing subsumption in iterator category detection
52 static_assert(__detail::__cpp17_bidi_iterator
<bidi_iterator
>);
53 static_assert(same_as
<iterator_traits
<bidi_iterator
>::iterator_category
,
54 bidirectional_iterator_tag
>,
55 "PR libstdc++/97935");