> The library has a price for performance compared to native value
> operations. However, part of the requirements will be a flag (a #define
> ) that turns off the unit processing for the code, which effectively
> removes the classes (replaces the UnitValue simply with typedefs of the
> stored type).

This is doable in my library at the above link.
(However problems would start to arise if you need prefixed or incoherent
units.)