Boost logo

Geometry :

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

Hi again,


I wonder why you bothered to make boost::geometry::model::ring a type of its own, merely wrapping the Container type. It does not have any methods or members of its own. Some say that inheriting from an STL type is practically always a bad idea, and the same rationale applies here.


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:


(If you are puzzled by my passing a vector by value, you might want to read by Dave Abrahams.)


Maybe that's something to consider for a future version. At the surface, it doesn't look like a change that has many implications on existing code. I assume this could be relatively easily fixed.




Volker Schöch | vschoech_at_[hidden]
Senior Software Engineer
think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany | 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