diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp index b2e7d5f..497b1e3 100755 --- a/include/boost/range/iterator_range_core.hpp +++ b/include/boost/range/iterator_range_core.hpp @@ -290,31 +290,11 @@ namespace boost return *--last; } - -#ifdef __SUNPRO_CC reference operator[]( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); return m_Begin[at]; } -#else - // Using the operator_brackets_result mechanism properly supports - // the corner cases with proxies for references etc. However - // the operator_brackets_result implementation does not support - // pointers as iterators. Since a pointer can't have the - // issues with proxies this implementation uses a simpler - // implementation if the iterator is a pointer. - BOOST_DEDUCED_TYPENAME boost::mpl::if_< - boost::is_pointer, - reference, - BOOST_DEDUCED_TYPENAME boost::detail::operator_brackets_result::type - >::type - operator[]( difference_type at ) const - { - BOOST_ASSERT( at >= 0 && at < size() ); - return get_at(m_Begin, at); - } -#endif // // When storing transform iterators, operator[]() @@ -340,27 +320,6 @@ namespace boost } private: - template - static BOOST_DEDUCED_TYPENAME boost::enable_if< - boost::is_pointer, - reference - >::type - get_at( Iterator it, difference_type at ) - { - return it[at]; - } - - template - static BOOST_DEDUCED_TYPENAME boost::disable_if< - boost::is_pointer, - BOOST_DEDUCED_TYPENAME boost::detail::operator_brackets_result::type - >::type - get_at( Iterator it, difference_type at ) - { - typedef boost::detail::use_operator_brackets_proxy use_proxy; - return boost::detail::make_operator_brackets_result(it + at, use_proxy()); - } - // begin and end iterators IteratorT m_Begin; IteratorT m_End;