Subject: Re: [boost] [iterator] iterator_facade reference type problem
From: er (erwann.rogard_at_[hidden])
Date: 2010-01-14 07:47:59
Phil Endecott wrote:
> Dear All,
> But what do I do about the reference type? I can't use std::pair<const
> KEY,VALUE>& because I'm not storing the keys and values in that way.
> It's almost possible to use std::pair<KEY,VALUE> for a const_iterator,
> but not if you want to allow the user to change the value through the
You are iterating over 2 vectors in parallel? Isn't that the job of
zip_iterator? If you insist on using iterator_facade, my guess would be,
since dereferencing creates a temporary, that iterator_facade::Reference
must be explicitly Value, not Value& (the default).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk