There are two libraries in Boost which introduces it's own Polygons concepts:
- Boost.Geometry (http://www.boost.org/libs/geometry)
- Boost.Polygon (http://www.boost.org/libs/polygon)
I'm not sure what do you have in mind saying "template reinitialization". Maybe you wanted to say "template specialization" which is sometimes required to adapt some class to a Concept.
If you're wondering why this is done this way. This allows to call algorithms implemented in those libraries passing objects of some legacy classes. The programmer must just adapt those classes to one of the required concepts and he can use them without the conversion to some intermediate object.
This is very similar to the way how traits are used in C++. E.g. when some new iterator class is implemented the std::iterator_traits<>
template may be specialized to define traits for this iterator. This would be one of the things the programmer should do to adapt this new iterator class to one of the Iterator concepts, e.g. ForwardIterator concept. Then he could use it in STL algorithms like std::for_each()
.
Polygons concepts introduced by those libraries are described here:
- Boost.Geometry - http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_polygon.html
- Boost.Polygon - http://www.boost.org/libs/polygon/doc/gtl_polygon_concept.htm
Typically, libraries provides also classes already adapted to the supported Concepts. E.g. Boost.Geometry provides boost::geometry::model::polygon<>
(http://www.boost.org/libs/geometry/doc/html/geometry/reference/models/model_polygon.html)
Probably it'd be possible to adapt some class to both concepts and use it in both libraries but I'm not sure about it.