I am trying to create a derived_dimension
in boost::units
for mass flow rate for si
system. I cannot find any documentation on how to do this simple task. This is what I have so far but I am getting errors during the compilation.
typedef boost::units::derived_dimension<
boost::units::mass_base_dimension, 3,
boost::units::time_base_dimension, -1
>::type mass_flow_rate_dimension;
typedef boost::units::unit<
mass_flow_rate_dimension,
boost::units::si::system
> mass_flow_rate_unit;
typedef boost::units::quantity<mass_flow_rate_unit, double> mass_flow_rate;
BOOST_UNITS_STATIC_CONSTANT(kilogram_per_seconds, mass_flow_rate);
This is how I get the error:
mass_flow_rate MFR;
quantity<mass_density> density = 1.0 * kilogram_per_cubic_meter;
quantity<si::time> Time = 1.0 * second;
quantity<volume> vol = 1.0 * cubic_meters;
MFR = density * vol / Time;
error: C2338 (is_simply_convertible::value == true)