quantities

The purpose of this small library is to perform automatic compile-time or run-time dimensional checking when dealing with quantities and units.

There is no actual distinction between units and quantities, so there are no distinct quantity and unit types. All operations are actually done on quantities. For example, meter is both the unit _meter_ and the quantity _1m_. New quantities can be derived from other ones using operators or dedicated functions.

Quantities can be parsed from strings at run time and compile time.

The main SI units and prefixes are predefined. Units with other dimensions can be defined by the user.

Modules

compiletime
module quantities.compiletime
Undocumented in source.
runtime
module quantities.runtime
Undocumented in source.
si
module quantities.si

This packages defines the SI units, prefixes and utility functions.

Public Imports

quantities.compiletime
public import quantities.compiletime;
Undocumented in source.
quantities.runtime
public import quantities.runtime;
Undocumented in source.
quantities.si
public import quantities.si;
Undocumented in source.

Meta

License

Boost License 1.0.