On 27/09/2018 13:56, Steven Watanabe wrote:
The library has no way to know what the correct intermediate unit is.
Yes, that's what I said.
You can use BOOST_UNITS_DEFAULT_CONVERSION to specify. (Yes, I know this is kind of clunky).
Interesting. I was not aware of that (and that's not how I initially read the [minimal] docs for it, although now that you've said that I can see how it can be interpreted that way). Oddly, given these: BOOST_UNITS_DEFAULT_CONVERSION(imperial::length_base_unit, si::length); BOOST_UNITS_DEFAULT_CONVERSION(nautical::length_base_unit, si::length); Only one of these two lines actually needs to be defined in order to make both direct conversions (ft -> nmi and nmi -> ft) compile. Given that all three base units are independent, how does this work?