59#ifndef _STL_ITERATOR_BASE_TYPES_H
60#define _STL_ITERATOR_BASE_TYPES_H 1
62#pragma GCC system_header
66#if __cplusplus >= 201103L
70namespace std _GLIBCXX_VISIBILITY(default)
72_GLIBCXX_BEGIN_NAMESPACE_VERSION
117 typename _Pointer = _Tp*,
typename _Reference = _Tp&>
140#if __cplusplus >= 201103L
143 template<
typename _Iterator,
typename = __
void_t<>>
146 template<
typename _Iterator>
150 typename _Iterator::difference_type,
154 typedef typename _Iterator::iterator_category iterator_category;
155 typedef typename _Iterator::value_type value_type;
156 typedef typename _Iterator::difference_type difference_type;
157 typedef typename _Iterator::pointer pointer;
158 typedef typename _Iterator::reference reference;
161 template<
typename _Iterator>
162 struct iterator_traits
163 :
public __iterator_traits<_Iterator> { };
165 template<
typename _Iterator>
166 struct iterator_traits
168 typedef typename _Iterator::iterator_category iterator_category;
169 typedef typename _Iterator::value_type value_type;
170 typedef typename _Iterator::difference_type difference_type;
171 typedef typename _Iterator::pointer pointer;
172 typedef typename _Iterator::reference reference;
177 template<
typename _Tp>
178 struct iterator_traits<_Tp*>
181 typedef _Tp value_type;
183 typedef _Tp* pointer;
184 typedef _Tp& reference;
188 template<
typename _Tp>
192 typedef _Tp value_type;
194 typedef const _Tp* pointer;
195 typedef const _Tp& reference;
202 template<
typename _Iter>
203 inline typename iterator_traits<_Iter>::iterator_category
205 {
return typename iterator_traits<_Iter>::iterator_category(); }
209#if __cplusplus < 201103L
212 template<
typename _Iterator,
bool _HasBase>
215 typedef _Iterator iterator_type;
216 static iterator_type _S_base(_Iterator __it)
220 template<
typename _Iterator>
221 struct _Iter_base<_Iterator, true>
223 typedef typename _Iterator::iterator_type iterator_type;
224 static iterator_type _S_base(_Iterator __it)
225 {
return __it.base(); }
229#if __cplusplus >= 201103L
230 template<
typename _InIter>
231 using _RequireInputIter =
typename
232 enable_if<is_convertible<
typename
233 iterator_traits<_InIter>::iterator_category,
234 input_iterator_tag>::value>::type;
237_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
Marking output iterators.
Forward iterators support a superset of input iterator operations.
Bidirectional iterators support a superset of forward iterator operations.
Random-access iterators support a superset of bidirectional iterator operations.
_Category iterator_category
One of the tag types.
_Pointer pointer
This type represents a pointer-to-value_type.
_Distance difference_type
Distance between iterators is represented as this type.
_Reference reference
This type represents a reference-to-value_type.
_Tp value_type
The type "pointed to" by the iterator.
Traits class for iterators.