
Boost : 
From: Greg Colvin (gcolvin_at_[hidden])
Date: 20011024 14:16:24
From: Peter Dimov <pdimov_at_[hidden]>
> From: "Greg Colvin" <gcolvin_at_[hidden]>
> > From: Peter Dimov <pdimov_at_[hidden]>
> > > float const pi_f = math::pi;
> >
> > I think on Noah's system this will result in the value in double const pi
> > being converted, slowly, at runtime.
>
> Once, at startup. If this is really a problem, we can (and probably should)
> add pi_f (and pi_l) to math:: as well.
Once in this case. But take away the const and put the initialization
in block scope ...
> The question is, what is the value of providing a generic framework that can
> handle types that we don't know about.
Well, the advantage of fetching the constants via an
inline function is that it is faster, and that an more
precise implementation might be possible, e.g. with an
extension for hexadecimal literals.
As for the framework being useful for types we don't
know about, maybe so. For instance, would anyone be
interested in specializing all the constants for
rationals?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk