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