Boost logo

Geometry :

Subject: [ggl] combine
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-04-02 05:52:38


Barend Gehrels wrote:
> There is no big difference. The _inserter versions might be chained like
> described here:
> http://bit.ly/ihdbMw
>
> so here the difference is turned into a symmetric difference.
>
> In that sense, yes it is an inserter because it can be placed on the
> same level as the std::back_inserter.
>
> These functions were there from the beginning, when we didn't have the
> multi-polygons so tightly integrated. But the call to (e.g.)
> intersection can handle a std::vector<Polygon> as well. I've no big
> problem moving them to e.g namespace detail, but they should stay
> because they are called from the functions without the _inserter suffix.

I see. It's ok to have them in the global namespace. Just think about
the name as Bruno wrote.

But I have another thouht. Are there many xxx_inserter functions? If so,
maby it's good to create separate namespace e.g. insert or inserters and
place them there:

geometry::insert::intersection(...)

if there will be no insert function or class in the geometry namespace
(which is hard to predict) or

geometry::inserters::intersection(...)

which is in the namespace with a name which probably won't be used or

geometry::inserters::intersect(...)

which name is a verb.

It all depends on how much time do you have preparing to the review.
Function in the geometry namespace is either a good solution.

Regards,
Adam


Geometry list run by mateusz at loskot.net