# include <boost/type.hpp>
# include <boost/static_assert.hpp>
# include <boost/type_traits.hpp>
+# include <boost/type_traits/conversion_traits.hpp>
# include <boost/detail/iterator.hpp>
# include <boost/detail/select_type.hpp>
};
-# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_STD_ITERATOR_TRAITS)
// Select default pointer and reference types for adapted non-pointer
// iterators based on the iterator and the value_type. Poor man's partial
BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
};
+
+ template <class T, class Result> struct dependent
+ {
+ typedef Result type;
+ };
+
} // namespace detail
# pragma warning(pop)
#endif
- value_type operator[](difference_type n) const
+ template <class diff_type>
+ typename detail::dependent<diff_type, value_type>::type operator[](diff_type n) const
{ return *(*this + n); }
self& operator++() {
#else
= Value &
#endif
- , class ConstReference = const Value&
+ , class ConstReference = Value const&
, class Category = BOOST_ARG_DEPENDENT_TYPENAME boost::detail::iterator_traits<
OuterIterator>::iterator_category
, class Pointer
#else
= Value*
#endif
- , class ConstPointer = const Value*
+ , class ConstPointer = Value const*
>
struct indirect_iterator_pair_generator
{