Steven Watanabe
If you substitute the correct unit types in place of the enum values in quantity<xxx>(some_value).value(), then the code above should work fine.
So I should be able to do something like: double length_in_feet = quantityus::foot_base_unit(10.0*si::meters).value(); to explicitly convert from meters to feet? Right now this gives 'boost::mpl::assertion_failed' while compiling quantity.hpp.
I'm not quite sure what you mean by achieving this implicitly using the type system. You have define the mapping from enum values to unit types somehow. There is no way for it to be deduced automatically.
My mistake, I meant to use a boost::unit instead of the enumeration inside of quantity... The enumerations just allow for run-time user input to control the type. Thanks, Justin