Boost logo

Boost Users :

Subject: [Boost-users] Help! //»Ø¸´:Re: [units] Conversions from quantities
From: ÖÓÖ¾ÎÄ (zzweng_2001_at_[hidden])
Date: 2015-08-13 21:40:36


Always deadlock, what is the problem, who can review my code attached in the ticket and give me an answer? Thanks very much .

My problem url:
https://svn.boost.org/trac/boost/ticket/11537

At 2015-08-14 03:20:47, "Michael Powell" <mwpowellhtx_at_[hidden]> wrote:
>On Thu, Aug 13, 2015 at 3:14 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>> AMDG
>>
>> On 08/12/2015 04:39 PM, Michael Powell wrote:
>>>
>>> Just wanted to clarify something. These should convert from given
>>> quantities to the desired units?
>>>
>>
>> If what you really want is a raw double,
>> than, yes, this should work.
>>
>>> double
>>> unit_conversion::from_length_to_inches(quantity<length> const & L) {
>>> const quantity<inch_base_unit::unit_type> result_(L);
>>> return result_.value();
>>> }
>>>
>>> double unit_conversion::from_mass_to_pounds(quantity<mass>
>>> const & M) {
>>
>> Pounds is a unit of force, not mass. To do
>> such a conversion, you need to multiply by g.
>
>Pound-force (literally, "lbf") or pounds (i.e. "lb")? Interestingly
>enough, I may also need to work in Pound-force, or a neighboring unit,
>i.e. "slugs.ft/s"
>
>http://en.wikipedia.org/wiki/Pound_(mass)
>
>http://en.wikipedia.org/wiki/Pound_(force)
>
>Would you mind disambiguating that in terms of Boost.Units? As far as
>I can tell from the US base unit
>(BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED), we're talking about Mass
>in this instance.
>
>Thank you...
>
>>> const quantity<ounce_base_unit::unit_type> result_(M);
>>> return result_.value();
>>> }
>>>
>> In Christ,
>
>BTW, did you find the PR okay for next version(s) of Units and/or Boost?
>
>> Steven Watanabe
>
>In Him.
>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users



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