Quantity reference type
Synopsis
Declared in <mp‐units/framework/reference.h>
template<
QuantitySpec Q,
Unit U>
struct reference;
Description
Quantity reference describes all the properties of a quantity besides its representation type.
In most cases this class template is not explicitly instantiated by the user. It is implicitly instantiated by the library's framework while binding a quantity specification with a compatible unit.
Reference auto kmph = isq::speed[km / h];
QuantityOf<isq::speed[km / h]> auto speed = 90 * kmph;
The following syntaxes are not allowed: 2 / kmph, kmph * 3, kmph / 4, 70 * isq::length[km]/ isq:time[h].
Friends
Name |
Description |
Computes the cubic root of a reference |
|
Computes the square root of a reference |
|
Computes the value of a reference raised to the |
|
Computes the inverse of a reference |
|
Divides a unit by a reference |
|
Divides a reference by a unit |
|
Divides a reference by another reference |
|
Multiplies a unit by a reference |
|
Multiplies a reference by a unit |
|
Multiplies two references |
|
Checks whether a reference is equal to a unit |
|
Checks whether two references are equal |
|
Returns the unit of a reference |
|
Returns the quantity specification of a reference whose |
|
Returns the quantity specification of a reference |
Created with MrDocs