
Hi,
Boost.Units offers automatic conversion (if conversion factor is
defined) on construction of variables:
quantitycgs::lengh A = 4.*cgs::centimeter;
quantitysi::length a(A);
nice! But for some reason I believe this would work for argument
functions
double f(quantitysi::length v){ return 1.;}
...
quantitycgs::lengh A = 4.*cgs::centimeter
f(A); // doesn't work! not matching function
why is this? isn't the argument of the call a sort of construction
argument for the function argument, or is more like a plain
assignment. Is there a way to force the automatic conversion of the
function call.
Or I am forced to use this other long call?
f(quantitysi::length(A));
Thanks
Alfredo
Full code:
#include