|
Boost : |
From: Ronald Garcia (garcia_at_[hidden])
Date: 2002-07-13 10:19:00
On Fri, 12 Jul 2002, David Abrahams wrote:
> Can someone explain why we have a near-duplicate of
> boost/iterator_adaptors.hpp in the multi_array/ directory?
>
Boost MultiArray uses iterator_adaptors to implement its iterators.
The iterator category is std::input_iterator_tag because operator* does not
return a reference type. As a result, iterator_adaptors's implementation
of operator-> essentially returns a value_type. My iterators have
distinct reference and value_type types, which iterator_adaptors cannot
recognize, and I needed operator-> to return the reference rather
than the value_type type. In order to do that, I needed to include a
modified copy of iterator_adaptors in my code base (in the
boost::detail::multi_array namespace).
Cheers,
Ron
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk