Boost logo

Geometry :

Subject: [ggl] RE: A few Boost.Geometry questions
From: Bruno Lalande (bruno.lalande)
Date: 2010-09-24 12:24:06


> Yes. ?Typedefs do not create new types. ?MyLineSTring and MyPolygon are the same type by two different names.

Oh sorry, maybe I thought too fast. "typedef A B" advantageously
replace "class B: A" in some cases, but not in this situation
obviously. We really need specific types.

> I'm also not sure what variant does for him since his class is already behaving like a variant.

If he could make a container of his class, it would be OK indeed. But
he can't, since precisely Boost.Geometry forces him to split his
runtime polymorphic class into several classes (the wrappers mentioned
before) to obtain compile-time polymorphism (for concept checking,
etc). So from this standpoint, the only solution to make a container
that can hold any of those geometries seems to be to create a variant
of them. Can you see a way to shortcut that?

Bruno


Geometry list run by mateusz at loskot.net