Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-24 13:17:33


From: "Greg Colvin" <gcolvin_at_[hidden]>
> Michael's code was rejected by EDG in strict mode, but is easily fixed.
> The following version EDG believes to be conforming C++:

[...]

> So I think Michael's proposal to be the cleanest. And from a standards
> point of view, it should be possible to specify the interface so that
> the implementation is open. The important thing is that the expression
> float_constants::pi is convertable to float, not that it be any particular
> kind of object.

I think that this will be somewhat misleading.

boost::any pi = boost::double_constants::pi;

I don't really see what's wrong with the simple

namespace math
{
    double const pi = 3.14159265358...;
}

--
Peter Dimov
Multi Media Ltd.

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