::type> , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee
, typename remove_const< typename remove_pointer
::type >::type > { }; template struct pointer_reference : mpl::if_< is_same::type> , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee , typename remove_pointer::type& > { }; template struct pointer_iterator_traits { typedef T pointer; typedef std::random_access_iterator_tag iterator_category; typedef std::ptrdiff_t difference_type; typedef typename pointer_value_type::type value_type; typedef typename pointer_reference::type reference; }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // We'll sort iterator types into one of these classifications, from which we // can determine the difference_type, pointer, reference, and value_type template struct standard_iterator_traits { typedef typename Iterator::difference_type difference_type; typedef typename Iterator::value_type value_type; typedef typename Iterator::pointer pointer; typedef typename Iterator::reference reference; typedef typename Iterator::iterator_category iterator_category; }; template struct msvc_stdlib_mutable_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef typename std::iterator_traits::value_type* pointer; typedef typename std::iterator_traits::value_type& reference; }; template struct msvc_stdlib_const_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef const typename std::iterator_traits::value_type* pointer; typedef const typename std::iterator_traits::value_type& reference; }; # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION template struct is_bad_output_iterator : is_base_and_derived< std::iterator , Iterator> { }; struct bad_output_iterator_traits { typedef void value_type; typedef void difference_type; typedef std::output_iterator_tag iterator_category; typedef void pointer; typedef void reference; }; # endif // If we're looking at an MSVC6 (old Dinkumware) ``standard'' // iterator, this will generate an appropriate traits class. template struct msvc_stdlib_iterator_traits : mpl::if_< is_mutable_iterator , msvc_stdlib_mutable_traits , msvc_stdlib_const_traits >::type {}; template struct non_pointer_iterator_traits : mpl::if_< // if the iterator contains all the right nested types... is_full_iterator_traits // Use a standard iterator_traits implementation , standard_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF // Check for STLPort 4.0 broken _Iterator_category type , mpl::if_< is_stlport_40_debug_iterator , stlport_40_debug_iterator_traits # endif // Otherwise, assume it's a Dinkum iterator , msvc_stdlib_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF >::type # endif >::type { }; template struct iterator_traits_aux : mpl::if_< is_pointer , pointer_iterator_traits , non_pointer_iterator_traits >::type { }; template struct iterator_traits { // Explicit forwarding from base class needed to keep MSVC6 happy // under some circumstances. private: # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION typedef typename mpl::if_< is_bad_output_iterator , bad_output_iterator_traits , iterator_traits_aux >::type base; # else typedef iterator_traits_aux base; # endif public: typedef typename base::value_type value_type; typedef typename base::pointer pointer; typedef typename base::reference reference; typedef typename base::difference_type difference_type; typedef typename base::iterator_category iterator_category; }; // This specialization cuts off ETI (Early Template Instantiation) for MSVC. template <> struct iterator_traits { typedef int value_type; typedef int pointer; typedef int reference; typedef int difference_type; typedef int iterator_category; }; }} // namespace boost::detail # endif // workarounds namespace boost { namespace detail { namespace iterator_traits_ { template struct distance_select { static Difference execute(Iterator i1, const Iterator i2, ...) { Difference result = 0; while (i1 != i2) { ++i1; ++result; } return result; } static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*) { return i2 - i1; } }; } // namespace boost::detail::iterator_traits_ template inline typename iterator_traits::difference_type distance(Iterator first, Iterator last) { typedef typename iterator_traits::difference_type diff_t; typedef typename ::boost::detail::iterator_traits::iterator_category iterator_category; return iterator_traits_::distance_select::execute( first, last, (iterator_category*)0); } }} # endif # undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF # undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION #endif // ITERATOR_DWA122600_HPP_
, typename remove_pointer
::type& > { }; template struct pointer_iterator_traits { typedef T pointer; typedef std::random_access_iterator_tag iterator_category; typedef std::ptrdiff_t difference_type; typedef typename pointer_value_type::type value_type; typedef typename pointer_reference::type reference; }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // We'll sort iterator types into one of these classifications, from which we // can determine the difference_type, pointer, reference, and value_type template struct standard_iterator_traits { typedef typename Iterator::difference_type difference_type; typedef typename Iterator::value_type value_type; typedef typename Iterator::pointer pointer; typedef typename Iterator::reference reference; typedef typename Iterator::iterator_category iterator_category; }; template struct msvc_stdlib_mutable_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef typename std::iterator_traits::value_type* pointer; typedef typename std::iterator_traits::value_type& reference; }; template struct msvc_stdlib_const_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef const typename std::iterator_traits::value_type* pointer; typedef const typename std::iterator_traits::value_type& reference; }; # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION template struct is_bad_output_iterator : is_base_and_derived< std::iterator , Iterator> { }; struct bad_output_iterator_traits { typedef void value_type; typedef void difference_type; typedef std::output_iterator_tag iterator_category; typedef void pointer; typedef void reference; }; # endif // If we're looking at an MSVC6 (old Dinkumware) ``standard'' // iterator, this will generate an appropriate traits class. template struct msvc_stdlib_iterator_traits : mpl::if_< is_mutable_iterator , msvc_stdlib_mutable_traits , msvc_stdlib_const_traits >::type {}; template struct non_pointer_iterator_traits : mpl::if_< // if the iterator contains all the right nested types... is_full_iterator_traits // Use a standard iterator_traits implementation , standard_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF // Check for STLPort 4.0 broken _Iterator_category type , mpl::if_< is_stlport_40_debug_iterator , stlport_40_debug_iterator_traits # endif // Otherwise, assume it's a Dinkum iterator , msvc_stdlib_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF >::type # endif >::type { }; template struct iterator_traits_aux : mpl::if_< is_pointer , pointer_iterator_traits , non_pointer_iterator_traits >::type { }; template struct iterator_traits { // Explicit forwarding from base class needed to keep MSVC6 happy // under some circumstances. private: # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION typedef typename mpl::if_< is_bad_output_iterator , bad_output_iterator_traits , iterator_traits_aux >::type base; # else typedef iterator_traits_aux base; # endif public: typedef typename base::value_type value_type; typedef typename base::pointer pointer; typedef typename base::reference reference; typedef typename base::difference_type difference_type; typedef typename base::iterator_category iterator_category; }; // This specialization cuts off ETI (Early Template Instantiation) for MSVC. template <> struct iterator_traits { typedef int value_type; typedef int pointer; typedef int reference; typedef int difference_type; typedef int iterator_category; }; }} // namespace boost::detail # endif // workarounds namespace boost { namespace detail { namespace iterator_traits_ { template struct distance_select { static Difference execute(Iterator i1, const Iterator i2, ...) { Difference result = 0; while (i1 != i2) { ++i1; ++result; } return result; } static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*) { return i2 - i1; } }; } // namespace boost::detail::iterator_traits_ template inline typename iterator_traits::difference_type distance(Iterator first, Iterator last) { typedef typename iterator_traits::difference_type diff_t; typedef typename ::boost::detail::iterator_traits::iterator_category iterator_category; return iterator_traits_::distance_select::execute( first, last, (iterator_category*)0); } }} # endif # undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF # undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION #endif // ITERATOR_DWA122600_HPP_