I am currently designing an API where I want that the user to be able to write code like this:
PowerMeter.forceVoltage(1 mV); PowerMeter.settlingTime(1 ms);
You could use C++11's compile-time rational arithmetic support for the units, instead of defining literals or macros for the units.