All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes
util::quantities::units Namespace Reference

Definitions of actual units. More...

Classes

struct  Byte
 
struct  Coulomb
 
struct  Volt
 
struct  Tick
 
struct  Counts
 
struct  ElectronVolt
 
struct  Hertz
 
struct  Second
 
struct  Meter
 

Detailed Description

Definitions of actual units.

Units describe a reference quantity to measure a dimension. The namespace units contains the definitions of actual units (e.g. seconds, ampere...)

Each unit is represented by a class. Each class should follow the interface of util::quantities::concepts::UnitBase, but it does not have to inherit from it.

Each unit must provide its name and its symbol (no locale is supported!). Example:

/// Unit of data size.
struct byte {
static constexpr auto symbol = "B"sv;
static constexpr auto name = "byte"sv;
}; // byte
} // namespace util::quantities::units