Boost logo

Boost Users :

Subject: [Boost-users] [units] How to multiply a quantity with a dimensionless factor
From: Marcel (minusdreidb+boost_at_[hidden])
Date: 2011-07-30 16:25:36


Hi,

I'm new to boost and units and hope this is not too trivial. If I try to
multiply a quantity with a
dimensionless factor like

quantity<length> a;
quantity<length> b = 2.0 * b;

I get compiler errors due to missing operator*. So I worked around this
by using

quantity<length> b = quantity<dimensionless>(2.0) * b;

But I'm wondering if there is a easier and better readable way to do
this?

Thank you in advance,

Marcel


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