
I'm using Boost.Units in a program for school to make certain that my
equations are consistent (and that I didn't screw them up entering
them). In the next Velocity equation, first get assigned with no
problems, second causes a compiler error that I believe is saying that
the constructor for quantity<velocity> is explicit.
Why does first work without a conversion and second doesn't? Also,
how do I get second to work? I assume this will require some type of
explicit conversion, but wrapping the right-hand side with
quantity<velocity>(...) doesn't work.
const quantity<dimensionless> pi =
3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798;
const quantity<time> deltaTime = .1 * second;
const quantity<length> particleDiameter = .001 * meter;
const quantity<dimensionless> dragCoefficient = 0.5;
const quantity<dimensionless> specificGravityGold = 19.32;
const quantity<acceleration> gravity = 9.80665 * meters_per_second_squared;
const quantity<length> initialHeight = 0 * meters;
const quantity<time> initialTime = 0 * seconds;
const quantity<velocity> initialVelocity = root<2>(4.0/3 *
specificGravityGold * gravity * particleDiameter / dragCoefficient);
const quantity