Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] Range adaptors and compatibility with non-adapted iterators
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2012-01-11 20:54:51

On 1/10/2012 11:48 PM, Akira Takahashi wrote:
> I think this situation's better way is wrap by function template and
> use boost::optional.

I agree that returning the the item (using optional, if necessary) is better in this case
than returning an iterator, when the iterator is only used as a pointer that will not be
used for traversing in any manner.

Nice idea about wrapping the function (algorithm) first, and then using the range adaptor
on the outer.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at