diff --git a/include/boost/range/has_range_iterator.hpp b/include/boost/range/has_range_iterator.hpp index 8046eb4..3c7b083 100644 --- a/include/boost/range/has_range_iterator.hpp +++ b/include/boost/range/has_range_iterator.hpp @@ -7,10 +7,14 @@ // // For more information, see http://www.boost.org/libs/range/ // +// Acknowledgments: +// Ticket #8341: Arno Schoedl - improved handling of has_range_iterator upon +// use-cases where T was const. #ifndef BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED #define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED #include +#include #include #include #include @@ -28,7 +32,16 @@ namespace boost }; template - struct has_range_iterator_impl > >::type> + struct has_range_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME enable_if< + BOOST_DEDUCED_TYPENAME mpl::eval_if, + has_type::type> >, + has_type > + >::type + >::type + > : boost::mpl::true_ { }; @@ -40,7 +53,12 @@ namespace boost }; template - struct has_range_const_iterator_impl > >::type> + struct has_range_const_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME enable_if< + has_type > + >::type + > : boost::mpl::true_ { };