1 // Copyright David Abrahams 2003.
\r
2 // Distributed under the Boost Software License, Version 1.0. (See
\r
3 // accompanying file LICENSE_1_0.txt or copy at
\r
4 // http://www.boost.org/LICENSE_1_0.txt)
\r
5 #ifndef ITERATOR_TRAITS_DWA200347_HPP
\r
6 # define ITERATOR_TRAITS_DWA200347_HPP
\r
8 # include <boost/detail/iterator.hpp>
\r
9 # include <boost/detail/workaround.hpp>
\r
13 // Unfortunately, g++ 2.95.x chokes when we define a class template
\r
14 // iterator_category which has the same name as its
\r
15 // std::iterator_category() function, probably due in part to the
\r
16 // "std:: is visible globally" hack it uses. Use
\r
17 // BOOST_ITERATOR_CATEGORY to write code that's portable to older
\r
20 # if BOOST_WORKAROUND(__GNUC__, <= 2)
\r
21 # define BOOST_ITERATOR_CATEGORY iterator_category_
\r
23 # define BOOST_ITERATOR_CATEGORY iterator_category
\r
27 template <class Iterator>
\r
28 struct iterator_value
\r
30 typedef typename boost::detail::iterator_traits<Iterator>::value_type type;
\r
33 template <class Iterator>
\r
34 struct iterator_reference
\r
36 typedef typename boost::detail::iterator_traits<Iterator>::reference type;
\r
40 template <class Iterator>
\r
41 struct iterator_pointer
\r
43 typedef typename boost::detail::iterator_traits<Iterator>::pointer type;
\r
46 template <class Iterator>
\r
47 struct iterator_difference
\r
49 typedef typename boost::detail::iterator_traits<Iterator>::difference_type type;
\r
52 template <class Iterator>
\r
53 struct BOOST_ITERATOR_CATEGORY
\r
55 typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
\r
58 # if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
\r
60 struct iterator_value<int>
\r
66 struct iterator_reference<int>
\r
72 struct iterator_pointer<int>
\r
78 struct iterator_difference<int>
\r
84 struct BOOST_ITERATOR_CATEGORY<int>
\r
90 } // namespace boost::iterator
\r
92 #endif // ITERATOR_TRAITS_DWA200347_HPP
\r