mp_units::reference

Quantity reference type

Synopsis

Declared in <mp-units/framework/reference.h>
template<
    QuantitySpec Q,
    Unit U>
struct reference;


Friends

|===
Name Description
cbrt
sqrt
pow Computes the value of a reference raised to the Num/Den power
inverse
operator/
operator/
operator/
operator*
operator*
operator*
operator== Equality operator
operator== Equality operator

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.

{.cpp} Reference auto kmph = isq::speed[km / h]; QuantityOf auto speed = 90 * kmph;

The following syntaxes are not allowed: 2 / kmph, kmph 3, `kmph / 4, 70 isq::length[km] / isq:time[h].

Created with MrDocs