quan is a library written in C++, originally for creating C++ types representing physical quantities. See the wiki for more information.