|
Boost : |
From: Steven Watanabe (steven_at_[hidden])
Date: 2007-02-06 18:46:48
AMDG
Matthias Schabel <boost <at> schabel-family.org> writes:
>
> > I would suggest that you have a
> > pod_quantity for defining the various
> > constants so that they can be safely
> > used during the dynamic initilization
> > phase.
>
> I'm not sure I follow you here...could you elucidate
> a little more?
template<class Unit, class T = double>
struct pod_quantity {
//like quantity but without constructors/assignment operators
T val_;
};
constants.hpp
pod_quantity<si::velocity> c = { 299792458 };
(for example)
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk