added operator() to allow random access index with transform iterators

[SVN r40375]
This commit is contained in:
Thorsten Jørgen Ottosen 2007-10-23 19:34:38 +00:00
parent d759c23552
commit 17514e1d44

View File

@ -348,10 +348,21 @@ namespace boost
return *--last;
}
reference operator[]( size_type sz ) const
reference operator[]( size_type at ) const
{
BOOST_ASSERT( sz < size() );
return m_Begin[sz];
BOOST_ASSERT( at < size() );
return m_Begin[at];
}
//
// When storing transform iterators, operator[]()
// fails because it returns by reference. Therefore
// operator()() is provided for these cases.
//
value_type operator()( size_type at ) const
{
BOOST_ASSERT( at < size() );
return m_Begin[at];
}
iterator_range& advance_begin( difference_type n )