
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. In Christ, Steven Watanabe