1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/iterator/iterator_traits.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,92 @@
1.4 +// Copyright David Abrahams 2003.
1.5 +// Distributed under the Boost Software License, Version 1.0. (See
1.6 +// accompanying file LICENSE_1_0.txt or copy at
1.7 +// http://www.boost.org/LICENSE_1_0.txt)
1.8 +#ifndef ITERATOR_TRAITS_DWA200347_HPP
1.9 +# define ITERATOR_TRAITS_DWA200347_HPP
1.10 +
1.11 +# include <boost/detail/iterator.hpp>
1.12 +# include <boost/detail/workaround.hpp>
1.13 +
1.14 +namespace boost {
1.15 +
1.16 +// Unfortunately, g++ 2.95.x chokes when we define a class template
1.17 +// iterator_category which has the same name as its
1.18 +// std::iterator_category() function, probably due in part to the
1.19 +// "std:: is visible globally" hack it uses. Use
1.20 +// BOOST_ITERATOR_CATEGORY to write code that's portable to older
1.21 +// GCCs.
1.22 +
1.23 +# if BOOST_WORKAROUND(__GNUC__, <= 2)
1.24 +# define BOOST_ITERATOR_CATEGORY iterator_category_
1.25 +# else
1.26 +# define BOOST_ITERATOR_CATEGORY iterator_category
1.27 +# endif
1.28 +
1.29 +
1.30 +template <class Iterator>
1.31 +struct iterator_value
1.32 +{
1.33 + typedef typename detail::iterator_traits<Iterator>::value_type type;
1.34 +};
1.35 +
1.36 +template <class Iterator>
1.37 +struct iterator_reference
1.38 +{
1.39 + typedef typename detail::iterator_traits<Iterator>::reference type;
1.40 +};
1.41 +
1.42 +
1.43 +template <class Iterator>
1.44 +struct iterator_pointer
1.45 +{
1.46 + typedef typename detail::iterator_traits<Iterator>::pointer type;
1.47 +};
1.48 +
1.49 +template <class Iterator>
1.50 +struct iterator_difference
1.51 +{
1.52 + typedef typename detail::iterator_traits<Iterator>::difference_type type;
1.53 +};
1.54 +
1.55 +template <class Iterator>
1.56 +struct BOOST_ITERATOR_CATEGORY
1.57 +{
1.58 + typedef typename detail::iterator_traits<Iterator>::iterator_category type;
1.59 +};
1.60 +
1.61 +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
1.62 +template <>
1.63 +struct iterator_value<int>
1.64 +{
1.65 + typedef void type;
1.66 +};
1.67 +
1.68 +template <>
1.69 +struct iterator_reference<int>
1.70 +{
1.71 + typedef void type;
1.72 +};
1.73 +
1.74 +template <>
1.75 +struct iterator_pointer<int>
1.76 +{
1.77 + typedef void type;
1.78 +};
1.79 +
1.80 +template <>
1.81 +struct iterator_difference<int>
1.82 +{
1.83 + typedef void type;
1.84 +};
1.85 +
1.86 +template <>
1.87 +struct BOOST_ITERATOR_CATEGORY<int>
1.88 +{
1.89 + typedef void type;
1.90 +};
1.91 +# endif
1.92 +
1.93 +} // namespace boost::iterator
1.94 +
1.95 +#endif // ITERATOR_TRAITS_DWA200347_HPP