Boost logo

Boost Users :

Subject: Re: [Boost-users] [Units] Heterogeneous unit for pressure per time
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-02-27 18:44:59


AMDG

On 12/18/2014 04:20 AM, Dina Goldshtein wrote:
> I need to create a unit which represents pressure per time, specifically Bar per Minute. I tried creating it in the same way as I created similar units before:
> typedef boost::units::derived_dimension<boost::units::length_base_dimension, -1,
> boost::units::mass_base_dimension, 1,
> boost::units::time_base_dimension, -3>::type pressure_roc_dimension;
>
> typedef boost::units::unit<pressure_roc_dimension,
> boost::units::make_system<boost::units::metric::bar_base_unit,
> boost::units::metric::minute_base_unit>::type> bar_per_minute_unit;
>
> BOOST_UNITS_STATIC_CONSTANT(BarPerMinute, bar_per_minute_unit::unit_type);
>
> typedef boost::units::quantity<bar_per_minute_unit, double> BarPerMinuteRoC;
>
> And then I try to use it:
> BarPerMinuteRoC bpm = 5.0 * BarPerMinute;
> But this line doesn't compile with quite a long error trail which I'm having a bit of trouble understanding fully.
> 1>c:\workspace\externals\boost_1_57_0\include\boost\units\detail\linear_algebra.hpp(197): error C2039: 'item' : is not a member of 'boost::units::dimensionless_type'
> 1>

This looks remarkably like a bug that I just fixed.
https://github.com/boostorg/units/commit/423adb31c1eb9687d21a8af5506830a0de53a464

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