
On 16/08/2015 05:18, Michael Powell wrote:
Also, I'm not positive, the inches <-> meters length conversion isn't already defined? At least some errors leading up to this point seem to suggest that perhaps it is. Although I want to be careful that meters <-> inches is correct and that yards aren't getting in the way.
Inches are defined as a scaled version of yards, and a conversion between yards and meters is defined, so it is redundant (and not possible) to also define a conversion between meters and inches. After omitting the conversion factor, you also need to correct your function: typedef inch_base_unit::unit_type inch_unit; quantity<inch_unit> to_inches_length_quantity(quantity<length> const & L) { const quantity<inch_unit> result_(L); return result_; }