};
#endif
- template<typename _Tp>
- class __has_iterator_category
- {
- typedef char __one;
- typedef struct { char __arr[2]; } __two;
-
- template<typename _Up>
- struct _Wrap_type
- { };
-
- template<typename _Up>
- static __one __test(_Wrap_type<typename _Up::iterator_category>*);
-
- template<typename _Up>
- static __two __test(...);
-
- public:
- static const bool __value = sizeof(__test<_Tp>(0)) == 1;
- };
-
- template<typename _Tp>
- struct __is_iterator
- {
- enum { __value = (__has_iterator_category<_Tp>::__value
- || __is_pointer<_Tp>::__value) };
- typedef typename __truth_type<__value>::__type __type;
- };
-
_GLIBCXX_END_NAMESPACE
#endif //_CPP_TYPE_TRAITS_H