Boost logo

Geometry :

Subject: Re: [geometry] for_each_point and lambda with reference-captures in MSVC10
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-02-09 13:41:40


Hi Volker,

On 9-2-2012 14:42, Volker Schöch wrote:
> Thank you for your quick and helpful comments on the other issues! boost::geometry::for_each_point does not work with lamda expressions that have a reference capture. For illustration, see the code and error message below.
>
> This may be a peculiarity of MSVC10; at least boost::for_each seems to have some special code in place that seems to work around this very issue. I have no idea what you are going to do with this information...

Include the parts that are compiling in the docs? It nicely illustrates
how it can be used.

To be honest I've never tried what you are doing now, and I'm glad to
see that it is basically working. The things which are not working can
be fixed later but we're not yet at that stage. Unless you're providing
a fix of course ;-)

One more thing, I did try to compile your input (which succeeds if I
comment the non-compiling stuff) and adapted it. It compiles and runs
but... the lambda does not have any effect. I.e. the geometry is
unaffected. So there are some additional problems.

Regards, Barend


Geometry list run by mateusz at loskot.net