Boost logo

Boost :

From: Lewis Hyatt (lhyatt_at_[hidden])
Date: 2007-03-29 17:58:52


Eric Lemings wrote:
> It's not a faux operation: the unit is already plainly specified as part
> of the type and the value of the quantity is plainly specified as the
> constructor argument. Pretty straight forward if you ask me.

consider this usage:

quantity<SI::length> l1(2.0 * SI::meters);
quantity<SI::length> l2(2.0 * Astro::parsecs); //for illustration only

That's why you need the unit multiplication on the right. This seems to
me to be a very clear way to express the fact that you want the quantity
to be in the SI length unit (which is the meter), but you want to be
free to use whatever units you want to specify it on the right.

-Lewis


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