Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-10-24 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at