Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-10-25 08:23:31

Hi Bernard,

Glad to hear iterator_adaptor has been useful to you.

Would you please post a short example demonstrating the problem
you describe?



 Jeremy Siek www:
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906

On 25 Oct 2000, Bernard HUGUENEY wrote:

> Hi,
> I'm greatly interested by iterator_adaptor, and currently (ab)using it a lot.
> It really made me rewrite as much of my own stuff as time permitted to make my iterators "right".
> I'm currently experiencing troubles when composing some iterators:
> when I retrun a dereference() value, it is by reference, but if the underlying iterator (as one from counting_iterator_policies) returns by value, the compiler complains that I take the reference to the temporary underlying return value :-(
> Would it be possible to fix integer_range ? Or what would be the correct workaround ? It might be that counting_iterator_policies is correct :-( I guess that means I should specialize my iterator wrappers to hold a copy
> of the dereferenced iterator is it's iterator_traits<>::reference is not one, but I'd rather not...
> A problem, I believe, lie in the fact that the refreturned is not const, and dereference() takes a const iterator. I did not
> find any satisfying solution (my code uses const_cast<>), but I'no guru myself :-)
> Anyway, thank you for the great work, I'm always more than happy to rewrite code when it involves using some
> "treasures from the vault" :-)
> Bernard
> ----
> European Union wants to know what people think of software patents !

Boost list run by bdawes at, gregod at, cpdaniel at, john at