30#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
31#define _STLP_INTERNAL_ITERATOR_BASE_H
33#ifndef _STLP_INTERNAL_CSTDDEF
43#if !defined(_STLP_USE_OLD_HP_ITERATOR_QUERIES) && !defined(_STLP_CLASS_PARTIAL_SPECIALIZATION)
44# ifndef _STLP_TYPE_TRAITS_H
69#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
77#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
78# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::iterator_category(_It)
79# define _STLP_DISTANCE_TYPE(_It, _Tp) _STLP_STD::distance_type(_It)
80# define _STLP_VALUE_TYPE(_It, _Tp) _STLP_STD::value_type(_It)
83# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) __false_type()
85# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
86# define _STLP_VALUE_TYPE(_It, _Tp) (_STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::value_type*)0
87# define _STLP_DISTANCE_TYPE(_It, _Tp) (_STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::difference_type*)0
88# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || \
89 (defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__)
90# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::iterator_traits< _Tp >::iterator_category()
92# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::iterator_category()
94# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) _STLP_STD::_IsRefType< _STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::reference >::_Ret()
96# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::__iterator_category(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
97# define _STLP_DISTANCE_TYPE(_It, _Tp) _STLP_STD::__distance_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
98# define _STLP_VALUE_TYPE(_It, _Tp) _STLP_STD::__value_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
99# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) __false_type()
103#if defined (_STLP_DONT_REDEFINE_STD) && defined (_STLP_WHOLE_NATIVE_STD)
113# if defined (_STLP_HAS_INCLUDE_NEXT)
114# include_next <iterator>
116# include _STLP_NATIVE_HEADER(iterator)
121template <
class _IteCat>
122struct _CategoryMapping
123{
typedef _IteCat _Tag; };
126struct _CategoryMapping<::std::input_iterator_tag>
129struct _CategoryMapping<::std::output_iterator_tag>
132struct _CategoryMapping<::std::forward_iterator_tag>
135struct _CategoryMapping<::std::bidirectional_iterator_tag>
138struct _CategoryMapping<::std::random_access_iterator_tag>
141template <
class _Iterator>
143 typedef typename _Iterator::iterator_category _OriginalTag;
146template <
class _Iterator>
156#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (__SUNPRO_CC)
157# define _STLP_DIFFERENCE_TYPE(_Iterator) typename iterator_traits<_Iterator>::difference_type
159# define _STLP_DIFFERENCE_TYPE(_Iterator) ptrdiff_t
162#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
183# if defined (__BORLANDC__)
200#ifndef _STLP_USE_OLD_HP_ITERATOR_QUERIES
207# ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
210inline _STLP_STD::random_access_iterator_tag
212{
return _STLP_STD::random_access_iterator_tag(); }
214template <
class _Iter>
217 typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::iterator_category _Category;
226template <
class _Iter>
229 typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::difference_type _diff_type;
238template <
class _Iter>
241 typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::value_type _value_type;
248template <
class _Category,
class _Tp,
class _Distance,
class _Po
inter,
class _Reference>
250template <
class _Category,
class _Tp,
class _Distance,
class _Po
inter,
class _Reference>
252template <
class _Category,
class _Tp,
class _Distance,
class _Po
inter,
class _Reference>
262#if !defined (_STLP_NO_ANACHRONISMS)
268 public iterator <input_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
271 public iterator<forward_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
273 public iterator<bidirectional_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
275 public iterator<random_access_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
277# if defined (_STLP_BASE_MATCH_BUG) && defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
278template <
class _Tp,
class _Distance>
283template <
class _Tp,
class _Distance>
286template <
class _Tp,
class _Distance>
289template <
class _Tp,
class _Distance>
292template <
class _Tp,
class _Distance>
294template <
class _Tp,
class _Distance>
296template <
class _Tp,
class _Distance>
298template <
class _Tp,
class _Distance>
300template <
class _Tp,
class _Distance>
302template <
class _Tp,
class _Distance>
304template <
class _Tp,
class _Distance>
306template <
class _Tp,
class _Distance>
313template <
class _InputIterator>
315__distance(
const _InputIterator& __first,
const _InputIterator&
__last,
325#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
326template <
class _ForwardIterator>
328__distance(
const _ForwardIterator& __first,
const _ForwardIterator&
__last,
331 _ForwardIterator
__it(__first);
338template <
class _B
idirectionalIterator>
340__distance(
const _BidirectionalIterator& __first,
const _BidirectionalIterator&
__last,
343 _BidirectionalIterator
__it(__first);
351template <
class _RandomAccessIterator>
353__distance(
const _RandomAccessIterator& __first,
const _RandomAccessIterator&
__last,
355{
return __last - __first; }
359template <
class _InputIterator>
364#if !defined (_STLP_NO_ANACHRONISMS)
365template <
class _InputIterator,
class _Distance>
367 const _InputIterator&
__last, _Distance&
__n)
368{
__n += _STLP_STD::distance(__first,
__last); }
370# if defined (_STLP_MSVC)
372template <
class _InputIterator,
class _Dist>
373inline void _STLP_CALL _Distance(_InputIterator __first,
375{
__n += _STLP_STD::distance(__first,
__last); }
431#define _STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits) \
432template <class _Tp> \
434template <class _Tp> \
435struct _Const##Motif : public _STLP_STD::_Const_##Traits<_Tp> { \
436 typedef _Const##Motif<_Tp> _ConstTraits; \
437 typedef _##Motif<_Tp> _NonConstTraits; \
439template <class _Tp> \
440struct _##Motif : public _STLP_STD::_Nonconst_##Traits<_Tp> { \
441 typedef _Const##Motif<_Tp> _ConstTraits; \
442 typedef _##Motif<_Tp> _NonConstTraits; \
445#define _STLP_CREATE_ITERATOR_TRAITS(Motif, Traits) \
446_STLP_MOVE_TO_PRIV_NAMESPACE \
447_STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits) \
448_STLP_MOVE_TO_STD_NAMESPACE
450#define _STLP_CREATE_HASH_ITERATOR_TRAITS(Motif, Traits) \
451_STLP_MOVE_TO_PRIV_NAMESPACE \
452_STLP_CREATE_ITERATOR_TRAITS_BASE(NonLocal##Motif, Traits) \
453_STLP_CREATE_ITERATOR_TRAITS_BASE(Local##Motif, Traits) \
454template <class _Tp> \
456 typedef _ConstNonLocal##Motif<_Tp> _ConstTraits; \
457 typedef _NonLocal##Motif<_Tp> _NonConstTraits; \
458 typedef _ConstLocal##Motif<_Tp> _ConstLocalTraits; \
459 typedef _Local##Motif<_Tp> _NonConstLocalTraits; \
461_STLP_MOVE_TO_STD_NAMESPACE
478template <
class _InputIter,
class _Distance>
481{
while (
__n--) ++__i; }
484template <
class _InputIter,
class _Distance>
487{
while (
__n--) ++__i; }
489#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
490template <
class _ForwardIterator,
class _Distance>
496template <
class _B
idirectionalIterator,
class _Distance>
506template <
class _RandomAccessIterator,
class _Distance>
514template <
class _InputIterator,
class _Distance>
#define random_access_iterator_tag
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator & __last
_STLP_END_NAMESPACE _STLP_BEGIN_NAMESPACE _STLP_STD::random_access_iterator_tag __iterator_category(const _Tp *, const __true_type &)
#define _STLP_DIFFERENCE_TYPE(_Iterator)
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter &__i, _Distance __n, const input_iterator_tag &)
_Tp * __value_type(const _Tp *, const __true_type &)
ptrdiff_t * __distance_type(const _Tp *, const __true_type &)
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_TEMPLATE_NULL
#define _STLP_TYPENAME_ON_RETURN_TYPE
#define _STLP_INLINE_LOOP
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_DFL_TMPL_PARAM(classname, defval)
#define __STATIC_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
GLsizei GLsizei GLfloat distance
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Nonconst_Const_traits< _Tp > _NonConstTraits
_Const_Const_traits< _Tp > _ConstTraits
_Const_traits< _Tp > _ConstTraits
_Nonconst_traits< _Tp > _NonConstTraits
_Const_Const_traits< _Tp > _ConstTraits
_Nonconst_Const_traits< _Tp > _NonConstTraits
_Nonconst_traits< _Tp > _NonConstTraits
_Const_traits< _Tp > _ConstTraits
output_iterator_tag iterator_category
_Iterator::value_type value_type
_Iterator::reference reference
_Iterator::difference_type difference_type
_Iterator::iterator_category iterator_category
_Iterator::pointer pointer
_Category iterator_category
_Distance difference_type