1 // { dg-options "-std=gnu++98" }
4 // Copyright (C) 2007-2017 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
26 template<class Iterator
> struct iterator_traits
;
27 template<class T
> struct iterator_traits
<T
*>;
29 template<class Category
, class T
, class Distance
,
30 class Pointer
, class Reference
> struct iterator
;
32 struct input_iterator_tag
;
33 struct output_iterator_tag
;
34 struct forward_iterator_tag
;
35 struct bidirectional_iterator_tag
;
36 struct random_access_iterator_tag
;
38 // 24.3.4, iterator operations:
39 template <class InputIterator
, class Distance
>
41 advance(InputIterator
& i
, Distance n
);
43 template <class InputIterator
>
44 typename iterator_traits
<InputIterator
>::difference_type
45 distance(InputIterator first
, InputIterator last
);
47 // 24.4, predefined iterators:
48 template <class Iterator
> class reverse_iterator
;
50 template <class Iterator
>
51 bool operator==(const reverse_iterator
<Iterator
>& x
,
52 const reverse_iterator
<Iterator
>& y
);
54 template <class Iterator
>
55 bool operator<(const reverse_iterator
<Iterator
>& x
,
56 const reverse_iterator
<Iterator
>& y
);
58 template <class Iterator
>
59 bool operator!=(const reverse_iterator
<Iterator
>& x
,
60 const reverse_iterator
<Iterator
>& y
);
62 template <class Iterator
>
63 bool operator>(const reverse_iterator
<Iterator
>& x
,
64 const reverse_iterator
<Iterator
>& y
);
66 template <class Iterator
>
67 bool operator>=(const reverse_iterator
<Iterator
>& x
,
68 const reverse_iterator
<Iterator
>& y
);
70 template <class Iterator
>
71 bool operator<=(const reverse_iterator
<Iterator
>& x
,
72 const reverse_iterator
<Iterator
>& y
);
74 template <class Iterator
>
75 typename reverse_iterator
<Iterator
>::difference_type
76 operator-(const reverse_iterator
<Iterator
>& x
,
77 const reverse_iterator
<Iterator
>& y
);
79 template <class Iterator
>
80 reverse_iterator
<Iterator
>
81 operator+(typename reverse_iterator
<Iterator
>::difference_type n
,
82 const reverse_iterator
<Iterator
>& x
);
84 template <class Container
> class back_insert_iterator
;
86 template <class Container
>
87 back_insert_iterator
<Container
> back_inserter(Container
& x
);
89 template <class Container
> class front_insert_iterator
;
91 template <class Container
>
92 front_insert_iterator
<Container
> front_inserter(Container
& x
);
94 template <class Container
> class insert_iterator
;
96 template <class Container
, class Iterator
>
97 insert_iterator
<Container
> inserter(Container
& x
, Iterator i
);
99 // 24.5, stream iterators:
100 template <class T
, class charT
, class traits
, class Distance
>
101 class istream_iterator
;
103 template <class T
, class charT
, class traits
, class Distance
>
104 bool operator==(const istream_iterator
<T
,charT
,traits
,Distance
>& x
,
105 const istream_iterator
<T
,charT
,traits
,Distance
>& y
);
107 template <class T
, class charT
, class traits
, class Distance
>
108 bool operator!=(const istream_iterator
<T
,charT
,traits
,Distance
>& x
,
109 const istream_iterator
<T
,charT
,traits
,Distance
>& y
);
111 template <class T
, class charT
, class traits
>
112 class ostream_iterator
;
114 template<class charT
, class traits
>
115 class istreambuf_iterator
;
117 template <class charT
, class traits
>
119 operator==(const istreambuf_iterator
<charT
,traits
>&,
120 const istreambuf_iterator
<charT
,traits
>&);
122 template <class charT
, class traits
>
123 bool operator!=(const istreambuf_iterator
<charT
,traits
>&,
124 const istreambuf_iterator
<charT
,traits
>&);
126 template <class charT
, class traits
>
127 class ostreambuf_iterator
;