Boost logo

Boost :

From: David Walthall (walthall_at_[hidden])
Date: 2007-04-02 15:41:55


Matthias Schabel wrote:
> Good point - I'm OK with having a single well-defined quantity_cast,
> eliminating the other use cases and eliminating
> quantity_reinterpret_cast - for the latter, users might just as well
> use the built-in reinterpret_cast...
>
> Matthias

Do the casts give you anything that dividing by the unit doesn't get for
you? For example, if we have a quantity len, and we want to get the value:

     quantity<SI::length> len = 2.0 * SI::meters;
     double d = len / SI::meters; // <---- gets the value!!

David


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