geometry
geometry copied to clipboard
[experimental] update test-demo with version with lambdas
Hi, this is an experimental version of partition using lambdas.
For demonstration and evaluation purposes.
I'm curious to your findings.
I updated this PR:
- adding a lambda version over one range as well (like the original had)
- applying the lambda version in
buffer
, which nicely removes many helper structures.
It's still in namespace experimental
(so don't merge yet), I can't put it in namespace geometry
because it conflicts with the structure partition
. Any suggestions?
I updated this PR:
- adding a lambda version over one range as well (like the original had)
- applying the lambda version in
buffer
, which nicely removes many helper structures.It's still in namespace
experimental
(so don't merge yet), I can't put it in namespacegeometry
because it conflicts with the structurepartition
. Any suggestions?
I'm now using detail::lambda_partition
.
Still to do:
- use it in
disjoint
- use it in
is_valid
- use it in
relate
So it's getting there.
Then we can deprecate partition
itself because it is not used inside the library.
In a next Boost version, we can delete it and rename partition_lambda
to just partition
.
gcc 5 now reports:
/home/gehrels/git_public/boost/boost/geometry/algorithms/detail/overlay/get_turns.hpp:524:32: error: request for member ‘bounding_box’ in ‘sec’, which is of non-class type ‘const int’
geometry::expand(box, sec.bounding_box, strategy);
This is inconvenient and wrong, it is there and correct. And it is only for the second lambda...
Any idea how to circumvent this?
which is of non-class type ‘const int’
It confuses the two overloads of partition_lambda
... If I use different names, it works. But that is less convenient....
To be continued.