
23 Jul
2009
23 Jul
'09
1:24 p.m.
AMDG Justin Leonard wrote:
Steven Watanabe <watanabesj <at> gmail.com> writes:
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 = quantity<us::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.
It asserts because a base_unit is just a tag type. Try us::foot_base_unit::unit_type. In Christ, Steven Watanabe