Boost logo

Geometry :

Subject: [ggl] for each
From: Bruno Lalande (bruno.lalande)
Date: 2011-10-03 10:08:48


Hi,

yes, of course. But the job required may differ a lot for different
>> geometry. The extra iterator facility could also be ineffeicient for
>> some geometries.
>>
>
> That's why we could have specialised iterators for different geometries,
> or I don't get the point.

That's my understanding too, but probably an example will better show me
that a specialized find algorithm would bring.

>
> Plus, the behaviour of std::find_if is to return
>> iterator for compare with end iterator, while some geometries do not
>> natively support that.
>>
>
> I don't understand that last sentence too.
> I believe we do assume geometries are ranges (of ranges...).

Yep, and the geometry has not much to do with that actually. find_if simply
returns the iterator passed as the "end" argument, so as long as your call
to find_if and your subsequent comparison are consistent in this regard,
there should be no problem.

Regards
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20111003/b674ddca/attachment.html


Geometry list run by mateusz at loskot.net