$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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