From 6cc4cbf1a160347d83fef4b03f7fc9189f4a360c Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Sun, 4 Apr 2010 11:38:14 +0000 Subject: [PATCH] Boost.Range a recent fix to a trac ticket causes a compilation error on Sun compilers. This commit causes the old code to be used for the operator[] of iterator_range on Sun compilers. [SVN r61038] --- include/boost/range/iterator_range_core.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp index 571bf7d..c1822fb 100755 --- a/include/boost/range/iterator_range_core.hpp +++ b/include/boost/range/iterator_range_core.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -289,6 +290,14 @@ namespace boost return *--last; } + +#ifdef __SUNPRO_CC + reference operator[]( difference_type at ) const + { + BOOST_ASSERT( at >= 0 && at < size() ); + return m_Begin[at]; + } +#else BOOST_DEDUCED_TYPENAME boost::detail::operator_brackets_result::type operator[]( difference_type at ) const { @@ -297,6 +306,7 @@ namespace boost typedef boost::detail::use_operator_brackets_proxy use_proxy; return boost::detail::make_operator_brackets_result(m_Begin + at, use_proxy()); } +#endif // // When storing transform iterators, operator[]()