Skip to content

mp_units::quantity::quantity

Constructor

Synopsis

Declared in <mp-units/framework/quantity.h>

template<typename FwdValue, Reference R2>
  requires(!equivalent(unit, get_unit(R2{}))) &&
          detail::QuantityConstructibleFrom<quantity, quantity<R2{}, std::remove_cvref_t<FwdValue>>>
[[nodiscard]] constexpr quantity(FwdValue&& val, R2);

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
valThe object to move construct from