Boost logo

Geometry :

Subject: Re: [geometry] breaking change on transform strategies
From: Bernhard (Bernhard.Schmitz_at_[hidden])
Date: 2013-11-25 05:58:26


Bruno Lalande wrote
> Thanks to maker functions, our code could basically
> become (using C++11 syntax, just replace with BOOST_AUTO otherwise or pass
> the strategies directly):
>
> auto rotate = make_rotate_transformer(...);
> auto translate = make_translate_transformer(...);
> bg::transform(..., rotate);
> bg::transform(..., translate);
>
> That would automatically return the right type of strategy, depending on
> the type of parameters passed (so you'd need to use the same type as what
> your points use, does that make the code even uglier in your situation?)
> and the number of parameters (e.g. the 9 params overload would return a
> strategy for points of dimension 2).
>
> Barend: what do you think of this?
> Bernhard: would this help at all?

Thanks for the explanation, I understand the reason for the change better
now. Also, I'm in favour of everything that reduces compile time. ;-)

For me, I think, I can live with it as it is now. But generally I think this
kind of maker functions would be a good addition.

What I do not yet understand, is why there are two dimension parameters. If
this can indeed be used with different source and target dimensions, then I
think the documentation should explain what happens if the dimensions are
unequal, because I cannot think of a "standard" behaviour for that.

Regards,
Bernhard

--
View this message in context: http://boost-geometry.203548.n3.nabble.com/breaking-change-on-transform-strategies-tp4025494p4025774.html
Sent from the Boost Geometry mailing list archive at Nabble.com.

Geometry list run by mateusz at loskot.net