C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches

Add the ability to specify units.

Add the ability to specify units.

3-8. Our dimensional analysis framework dealt with dimensions, but it
     entirely ignored the issue of units.  A length can be represented in
     inches, feet, or meters.  A force can be represented in newtons or in kg
     m/sec^2.  Add the ability to specify units and test your code.  Try to
     make your interface as syntactically friendly as possible for the user.
Todo:
Add a units matrix to the quantity class-template that gets converted on every arithmetic operation?