Boost logo

Boost :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-01-21 18:04:55


David Abrahams wrote:

>>>It sounds like your function returns T const& but you made the
> iterator's
>>>reference type plain T&. That's a no-no.

But I initialised the projection_iterator with a const_iterator over my
container and thus expected the reference type to be const T& but I now
see the result_type of the function is used to defined the
reference_type of the iterator_adaptor.

Anyway, I apparantly overlooked the const_projection_iterator and this
solves my problem.

BTW, should'nt it be a good idea to verify if the result_type of the
function is identical to the reference_type of the base iterator ?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk