Boost logo

Boost :

From: John Femiani (JOHN.FEMIANI_at_[hidden])
Date: 2007-10-05 14:36:41


> John wrote:
> >If we want boost to have a point class I think it will really have to
> be
> >a set of point adapters and point concepts that work for existing
> types.
> >There are too many points out there that we would have to interact
> with,
> >both outside of boost and also within boost. For instance it would
be
> >nice if algorithms worked with both Boost.Point and the CGAL point.
>
> That is exactly what I am proposing. You hit the nail on the head,
> there are too many points out there that we would have to interact
with.
> That is the problem I'm solving, that is why I'm submitting the
library
> to boost.
> assert(boost::point_concept<cgal::Point> cgalpt(10,20) ==
> boost::point(10, 20));
>
> and better yet
>
> //construct a cgal polygon data structure with the boost polygon
> constructor and assert that it is equal to the boost polygon data
> structure constructed from the same input vertex sequence.
> assert(boost::polygon_concept<cgal::Polygon> cgalpoly(itBegin, itEnd)
==
> boost::polygon(itBegin, itEnd));
>
> Smooth as butter.
>
> Luke

Hmm... I hope I am not revealing my ignorance too much here but I have
not seen concepts used that way before. In my experience they are used
with some macros to force an understandable error at compile time when a
data type does not support the required syntax. Do you have some code I
can see so I can maybe understand better?

 -- John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk