
Andy Little wrote:
If kilograms played by the rules its exponent would be 3 , but for whatever historical reasons its 0.
Why is "some historicasl reason" which we can't seem to puzzle out driving the implementation of the library?
The output for named quantities with coherent units is computed at compile time from the class template signature. For those interested this is in: <boost/pqs/meta/components/adjusted_coherent_prefix.hpp>
Without the prefix_offset, because kilograms has an exponent of 0, then its unit output would be worked out as 'g', which is plainly wrong.
Does this help?
Why not just give kg anb exponent of "3" like everywhere else and then adjust the other mass exponents accordingly. Why special-case this?
AFAICT this has no impact on the user interface. The user will just specify pqs::mass::kg and doesn't care what the underlying "prefix number" is. But this change makes the framework extender's job much easier.
Complain to the SI people. It aint my fault guvnor!
But it's your library! Honestly, I think you are too constrained by some paper SI standard. There is nothing at all that says the library must be implemented this way. -Dave