added operator() to allow random access index with transform iterators
[SVN r40375]
This commit is contained in:
parent
d759c23552
commit
17514e1d44
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user