|
Boost Users : |
Subject: Re: [Boost-users] [units] Creating specific unit quantities
From: Ryan (mccorywork_at_[hidden])
Date: 2011-03-03 15:10:13
On Thu, Mar 3, 2011 at 2:38 PM, Matthias Schabel
<boost_at_[hidden]>wrote:
>
> Maybe
> http://www.boost.org/doc/libs/1_46_0/doc/html/boost_units/Quantities.html#boost_units.Quantities.Quantity_Construction_and_Conversion?
>
> "implicit conversion between quantity<Unit1,Y> and quantity<Unit2,Z> is
allowed if Unit1 reduces to exactly the same combination of base units as
Unit2 and if Y and Z are convertible."
Doesn't si::length reduce to the base unit "si::meter_base_unit:unit_type"?
If it doesn't what is the base unit of si::length?
> quantity<si::length> is shorthand for quantity<si::length,double>.
> si::length is type representing a length in the SI system, so it
> encapsulates both the dimensionality of length and the specific measure of
> length.
>
I understand that si::length is a dimension. A value in a dimension has to
have a particular unit of measurement. In the case of length a value can be
either meters, kilometers, nanometers, centimeters, etc. The chosen unit of
measurement for si::length is meters.
Shouldn't I be able to create quantity of the si systems length (which is in
meters) and a quantity of type meters and have them work together?
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