60 #ifndef _STL_ITERATOR_BASE_TYPES_H
61 #define _STL_ITERATOR_BASE_TYPES_H 1
63 #pragma GCC system_header
67 #ifdef __GXX_EXPERIMENTAL_CXX0X__
71 namespace std _GLIBCXX_VISIBILITY(default)
73 _GLIBCXX_BEGIN_NAMESPACE_VERSION
117 template<
typename _Category,
typename _Tp,
typename _Distance = ptrdiff_t,
118 typename _Pointer = _Tp*,
typename _Reference = _Tp&>
141 #ifdef __GXX_EXPERIMENTAL_CXX0X__
145 template<typename _Iterator,
146 bool = __has_iterator_category<_Iterator>::value>
149 template<
typename _Iterator>
152 typedef typename _Iterator::iterator_category iterator_category;
153 typedef typename _Iterator::value_type value_type;
154 typedef typename _Iterator::difference_type difference_type;
155 typedef typename _Iterator::pointer pointer;
156 typedef typename _Iterator::reference reference;
159 template<
typename _Iterator>
160 struct iterator_traits
161 :
public __iterator_traits<_Iterator> { };
163 template<
typename _Iterator>
164 struct iterator_traits
166 typedef typename _Iterator::iterator_category iterator_category;
167 typedef typename _Iterator::value_type value_type;
168 typedef typename _Iterator::difference_type difference_type;
169 typedef typename _Iterator::pointer pointer;
170 typedef typename _Iterator::reference reference;
175 template<
typename _Tp>
176 struct iterator_traits<_Tp*>
179 typedef _Tp value_type;
180 typedef ptrdiff_t difference_type;
181 typedef _Tp* pointer;
182 typedef _Tp& reference;
186 template<
typename _Tp>
187 struct iterator_traits<const _Tp*>
190 typedef _Tp value_type;
191 typedef ptrdiff_t difference_type;
192 typedef const _Tp* pointer;
193 typedef const _Tp& reference;
200 template<
typename _Iter>
201 inline typename iterator_traits<_Iter>::iterator_category
203 {
return typename iterator_traits<_Iter>::iterator_category(); }
209 template<
typename _Iterator,
bool _HasBase>
212 typedef _Iterator iterator_type;
213 static iterator_type _S_base(_Iterator __it)
217 template<
typename _Iterator>
218 struct _Iter_base<_Iterator, true>
220 typedef typename _Iterator::iterator_type iterator_type;
221 static iterator_type _S_base(_Iterator __it)
222 {
return __it.base(); }
225 _GLIBCXX_END_NAMESPACE_VERSION
#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE)
Marking output iterators.
Forward iterators support a superset of input iterator operations.
_Distance difference_type
Distance between iterators is represented as this type.
Traits class for iterators.
_Pointer pointer
This type represents a pointer-to-value_type.
Bidirectional iterators support a superset of forward iterator operations.
iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
_Tp value_type
The type "pointed to" by the iterator.
_Category iterator_category
One of the tag types.
_Reference reference
This type represents a reference-to-value_type.
Random-access iterators support a superset of bidirectional iterator operations.