From: Gerhard Wesp (gwesp_at_[hidden])
Date: 2006-06-07 11:44:21
On Wed, Jun 07, 2006 at 03:16:47PM +0100, Paul Giaccone wrote:
> Reece Dunn wrote:
> > However, if you are working in *pounds*, and you want the *result*
> > in pounds (e.g. how many pounds of flour do I need to order?) then
> > you are going to end up with the result in kg!!
mass flour = x * pounds;
// Do some computation
std::cout << "You need " << flour / pounds << " pounds of flour\n";
Yes, if there is no other computation involved, we have an extra
division and multiplication here. But as I wrote, I would like to
encourage the users of a physical quantities library to actually use SI
> So including imperial (or even just non-metric) units is, I would say,
> quite important, not least because these are the official standard in
I agree. But let them be themselves in SI, e.g.
const length foot = .3048 ;
const mass pound = .4535924;
-- Gerhard Wesp ZRH office voice: +41 (0)44 668 1878 ZRH office fax: +41 (0)44 200 1818 For the rest I claim that raw pointers must be abolished.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk