|
Boost Users : |
Subject: Re: [Boost-users] [units] Creating specific unit quantities
From: Matthias Schabel (boost_at_[hidden])
Date: 2011-03-03 16:58:35
> 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?
base_units and base_dimensions represent the "basis vectors" for units/unit systems, so no. If you look in boost/units/systems/si/length.hpp you can see that si::length is unit<length_dimension,si::system>. I'm still uclear on what you're trying to accomplish. Why don't you give a code snippet that does what you want to do?
Matthias
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