|
Boost : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-05-24 06:47:00
After having read
http://www.boost.org/doc/libs/1_35_0/libs/iterator/doc/index.html
I have been left, believing that the new iterator concepts will
allow me to create an iterator that may return a proxy instead
of a reference.
I tried to do this by using the iterator_facade template, and
for the "Reference" parameter I specified a proxy class
that has a conversion operator to the "Value" type.
This almost works, but fails for expressions of
Val v = it[n];
expressions, because iterator facade does not return "Reference"
objects in that case, but operator_brackets_proxy objects that
are convertible to "Reference".
So I am wondering if I understand something wrong? Isn't the
decoupling of access and traversal meant to allow "Reference" be
a proxy object?
Any hints appreciated!
-- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz_at_[hidden] ________| http://www.blackspace.at
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk