Boost.Units, part of collection of the Boost C++ Libraries, implements dimensional analysis in a general and extensible manner, treating it as a generic compile-time metaprogramming problem. With appropriate compiler optimization, no runtime execution cost is introduced, facilitating the use of this library to provide dimension checking in performance-critical code.
Distributed under the Boost Software License, Version 1.0.