Boost logo

Geometry :

Subject: Re: [geometry] Default model for Ring Concept should *be* Container, not inherit from it
From: Volker Schöch (vschoech_at_[hidden])
Date: 2012-02-15 13:03:03


Mateusz,

> > I am not being pedantic, here is my case in point.
> > The current implementation requires some ugly syntantic hacking to achieve a very simple and natural thing:
> > http://codepad.org/qASAKH8R
>
> https://gist.github.com/1837500

Your code sample seems to suggest adding a fwd ctor and possibly a fwd operator= to the boost::geometry::model::ring class. Well, that would certainly be appreciated. However, instead of adding to the interface until it offers a full replication of the base container's interface, wouldn't it be simpler and more straight-forward to eliminate this hollow shell altogether? The existing ctor that takes a pair of iterators and merely forwards them to the base class actually illustrates my argument.

I am aware that I can always implement my own model of polygon and ring. At this point, there is no compelling reason for me to do so, the simple and basic default models are just fine. Yet I thought I might suggest a simplification to that default implementation. No offense!

Regards
   Volker

--
Volker Schöch | vschoech_at_[hidden]
Senior Software Engineer
think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany
http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl

Geometry list run by mateusz at loskot.net