
On Mon, Sep 19, 2011 at 1:14 PM, Steven Watanabe <watanabesj@gmail.com>wrote:
AMDG
On 09/19/2011 12:01 PM, Michael Powell wrote:
On Mon, Sep 19, 2011 at 12:57 PM, Steven Watanabe <watanabesj@gmail.com wrote:
On 09/19/2011 11:29 AM, Michael Powell wrote:
However, when I do this, I do get a compiler error:
quantity<cs::units::si::flow_rate, float> __fr = __C_flow *
__a_orifice *
boost::units::sqrt(__two * __p_diff / __d);
If it can be fixed from a library perspective, great. It's easy enough to workaround, however, taking static_cast<float>(x.value()) of the intermediate result, and so that we don't get too far removed from the dimensional analysis.
Actually, you can directly convert the quantities. The conversion is just explicit. You're getting an error because the code tries to do an implicit conversion.
Static casting the static_cast<quantity<flow_rate, float>>(...) will work. Thanks, bro.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users