|
Boost : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-05-25 05:49:07
Sebastian Redl wrote:
> I believe this would break code where reference == value_type (not
> unusual for input iterators), because the two conversion operators would
> have the same target type.
Hmm, yes.
Why would we need the conversion to reference from a proxy anyways?
Shouldn't this be just to value_type? (As the docs let me believe.)
> It might also introduce ambiguities where reference == value_type&
> (requirement for lvalue iterators). This should be pretty trivial to test.
There shouldn't be a proxy for reference == value_type& anyways,
should it?
What I do not understand yet is why the iterator_facade attempts to
return a proxy at all. Shouldn't this be in complete control of the
user of the library? I.e. the user has to implement the correct access
mode by providing proper classes for value_type and reference.
And if she decides to have swapable (no lvalue) iterator just a
suitable class for reference (which can be a proxy) has to be provided.
Perhaps I am overlooking something important here, but I think the
bracket proxy is superfluous in iterator_facade.
-- _________________________________________ _ _ | 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