Boost logo

Boost :

From: Eric Lemings (lemings_at_[hidden])
Date: 2006-08-21 15:39:49


 

> -----Original Message-----
> From: Eric Lemings
> Sent: Monday, August 21, 2006 10:58 AM
> To: 'boost_at_[hidden]'
> Subject: RE: [boost] Boost Units library preview
>
>
>
> > -----Original Message-----
> > From: boost-bounces_at_[hidden]
> > [mailto:boost-bounces_at_[hidden]] On Behalf Of Matthias Troyer
> > Sent: Sunday, August 20, 2006 6:29 AM
> > To: boost_at_[hidden]
> > Subject: Re: [boost] Boost Units library preview
> >
> >
> ...
> > Wait, if I multiply quantities (which have units) then also
> the result
> > will have a unit. E.g. if I divide 10 meters by 2 seconds
> then I get 5
> > m/s . I wouldn't call that anonymous since I know the
> > unit: m/s
>
> This brings up a good question. Say you have two objects:
>
> meters m = 1;
> feet f = 2;
>
> What is the type (or unit) of the following expression?
>
> m * f;

Doh! This should be addition, not multiplication.

m + f;

Eric.


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