|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61269 - trunk/boost/range
From: neil_at_[hidden]
Date: 2010-04-14 03:41:39
Author: neilgroves
Date: 2010-04-14 03:41:38 EDT (Wed, 14 Apr 2010)
New Revision: 61269
URL: http://svn.boost.org/trac/boost/changeset/61269
Log:
Boost.Range reverted attempted fix for iterator_range::operator[] since this was not a good fix.
Text files modified:
trunk/boost/range/iterator_range_core.hpp | 41 ----------------------------------------
1 files changed, 0 insertions(+), 41 deletions(-)
Modified: trunk/boost/range/iterator_range_core.hpp
==============================================================================
--- trunk/boost/range/iterator_range_core.hpp (original)
+++ trunk/boost/range/iterator_range_core.hpp 2010-04-14 03:41:38 EDT (Wed, 14 Apr 2010)
@@ -290,31 +290,11 @@
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<iterator>,
- reference,
- BOOST_DEDUCED_TYPENAME boost::detail::operator_brackets_result<iterator, value_type, reference>::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 @@
}
private:
- template<class Iterator>
- static BOOST_DEDUCED_TYPENAME boost::enable_if<
- boost::is_pointer<Iterator>,
- reference
- >::type
- get_at( Iterator it, difference_type at )
- {
- return it[at];
- }
-
- template<class Iterator>
- static BOOST_DEDUCED_TYPENAME boost::disable_if<
- boost::is_pointer<Iterator>,
- BOOST_DEDUCED_TYPENAME boost::detail::operator_brackets_result<Iterator, value_type, reference>::type
- >::type
- get_at( Iterator it, difference_type at )
- {
- typedef boost::detail::use_operator_brackets_proxy<value_type,reference> use_proxy;
- return boost::detail::make_operator_brackets_result<Iterator>(it + at, use_proxy());
- }
-
// begin and end iterators
IteratorT m_Begin;
IteratorT m_End;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk