Static Public Attributes | List of all members
util::quantities::concepts::UnitBase Struct Reference

#include <quantities.h>

Inheritance diagram for util::quantities::concepts::UnitBase:
util::quantities::units::Byte util::quantities::units::Coulomb util::quantities::units::Counts util::quantities::units::ElectronVolt util::quantities::units::Hertz util::quantities::units::Meter util::quantities::units::Second util::quantities::units::Tick util::quantities::units::Volt

Static Public Attributes

static constexpr std::string_view symbol = "?"sv
 Symbol of the unit (e.g. "A"). More...
 
static constexpr std::string_view name = "unknown"sv
 Long name of unit (e.g. "ampere"). More...
 

Detailed Description

A unit is the definition of a reference quantity to measure a dimension. For example, second or ampere.

Units are independent C++ classes which are required to present a minimal interface:

Here "string" is intended as an object convertible to std::string and which itself exposes a std::string-like behaviour.

Although units can be derived from UnitBase, there is currently no necessity to do so since no part is shared. UnitBase is therefore provided as an example implementation.

Definition at line 369 of file quantities.h.

Member Data Documentation

constexpr std::string_view util::quantities::concepts::UnitBase::name = "unknown"sv
static

Long name of unit (e.g. "ampere").

Definition at line 373 of file quantities.h.

constexpr std::string_view util::quantities::concepts::UnitBase::symbol = "?"sv
static

Symbol of the unit (e.g. "A").

Definition at line 371 of file quantities.h.


The documentation for this struct was generated from the following file: