Boost logo

Boost :

From: Ross MacGregor (ross__macgregor_at_[hidden])
Date: 2003-10-24 04:38:08


Ross MacGregor wrote:
> template<typename T, typename Transform, typename Dimention>
> class Quantity;
>
> Quantity<float, one, meter_t> meters;
> Quantity<float, scale(1000), meter_t> kilometers;
> Quantity<float, scale(1.4959855e11), meters_t) AU;
> Quantity<float, scale(0.000001), meters_t) micrometers;
> Quantity<float, scale(9.4605e15), meters_t) lightyear;
>
> Quantity<float, scale(0.3048), meter_t> feet;
> Quantity<float, scale(1609.344), meter_t> miles;

Sorry those brackets around scale are wrong:

Quantity<float, one, meter_t> meters;
Quantity<float, scale<1000>, meter_t> kilometers;
Quantity<float, scale<1.4959855e11>, meters_t) AU;
Quantity<float, scale<0.000001>, meters_t) micrometers;
Quantity<float, scale<9.4605e15>, meters_t) lightyear;

Quantity<float, scale<0.3048>, meter_t> feet;
Quantity<float, scale<1609.344>, meter_t> miles;

-- 
Ross MacGregor

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