Open nourani opened 10 years ago
It might be worth learning from the way Boost.Units handles this.
Hhhmm I don't know if expanding the set of base dimensions is the "correct" way of doing this, although it is a solution. Isn't there really a standard for this? Need to look into this again
I agree that it does not seem like a very elegant solution but I have not come across any good way of doing this either (especially if we want to minimize the runtime overhead of using this class).
Some of the Derived units have either no Base units or have the same units. These include:
angle (radian) = m/m solid angle (steradian) = m2/m2 Luminous Flux (lumen) = cd; same as Luminous Radioactivity (becquerel) = s-1; same as Frequency
The way we currently implement the template class we cannot differentiate between m, m/m, m2/m2 etc
Don't know what is the best way to deal with this. Maybe we need to include another variable to be used to keep track of these. I was thinking of using a "string literal" but didn't figure out how to implement this.