|
Boost Users : |
Subject: Re: [Boost-users] [units] Creating specific unit quantities
From: Ryan (mccorywork_at_[hidden])
Date: 2011-03-03 14:02:00
On Thu, Mar 3, 2011 at 12:02 PM, Matthias Schabel
<boost_at_[hidden]>wrote:
>
> I don't really understand what you're trying to accomplish.
I'm trying to add two quantities together. One quantity was created using
the si system and the other was created directly.
> That explains why "si::length" and "meters" are different
> things...basically, "meters" is an instance of si::length.
quantity<si::length> L = 2.0 * meters;
I thought what this meant was a quantity value was being creating with the
si::length dimension. The unit of measurement for si::length is the meter
and therefore the value 2.0 is being stored as 2.0 meters. I thought this
was confirmed when the display of the quantity value showed "2 m". If this
isn't what is occurring could you shed some light on this?
Ryan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net