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