Also, I should point out that you don't need the intermediate typedef.
BOOST_UNITS_STATIC_CONSTANT(nautical_mile,
metric::nautical_mile_base_unit::unit_type); will work just fine.
This was what I was looking for. I found that BOOST_UNITS_STATIC_CONSTANT needs to be declared outside of the class. I think is due to the namespace the macro uses. I couldn't though use it to declare nautical_miles_per_hour. BOOST_UNITS_STATIC_CONSTANT(nautical_miles, metric::nautical_mile_base_unit::unit_type); BOOST_UNITS_STATIC_CONSTANT(hours, metric::hour_base_unit::unit_type); BOOST_UNITS_STATIC_CONSTANT(nautical_miles_per_hour, decltype(BOOST_TYPEOF(nautical_miles)() / BOOST_TYPEOF(hours)())); //This doesn't compile I could however do the following. static const decltype(BOOST_TYPEOF(nautical_miles)() / BOOST_TYPEOF(hours)()) nautical_miles_per_hour; I don't understand the difference. Ryan