Boost logo

Boost :

Subject: Re: [boost] Preview 3 of the Geometry Library
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2008-10-14 20:20:24


Mathias wrote:
>- Why can objects be default-constructible?
>...
>- centroid says it throws an exception if the polygon does not contain
>any point. But how can a polygon not contain any points!?
>The constructor of a polygon should force it to have at least one
point.

Obviously, a default constructed polygon contains no points. Polygons
have to be default constructible so that they can be elements of a std
container. Objects that are not default constructible are a pain. I
have to deal with a legacy polygon type that is not default
constructible, so I have a very clear idea about which way I prefer and
why.

Luke


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