|
Boost Users : |
Subject: Re: [Boost-users] [units] How to assign "ft" to an si::length?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-19 16:48:51
AMDG
Terry Golubiewski wrote:
> Got it! Now the other part...
>
> typedef quantity<si::length> Length;
> Length x = 3.0 * ft;
>
> If x is an SI unit, how can I convert from "ft"?
> I'm missing something, but I'm not sure what.
First define ft as
static const us::foot_base_unit::unit_type ft;
Then
Length x(3.0 * ft);
should work.
In Christ,
Steven Watanabe
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