Boost logo

Geometry :

Subject: [ggl] for each
From: Mateusz Loskot (mateusz)
Date: 2011-09-30 13:20:11


On 30/09/11 12:01, feverzsj wrote:
> hi, Bruno
>
>>> find_if is a generic algorithms that doesn't care about the actual
>>> iterator type, so probably no need to develop a special one for
>>> geometries. Instead, we should probably have special iterators. But I
>>> assume Boost.Bind and Boost.Lambda can already help a lot without
>>> further development.
>
> 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.

> 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...).

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org

Geometry list run by mateusz at loskot.net