Returns this quantity re-expressed in another unit and representation type, both implicitly convertible.
Declared in <mp-units/framework/quantity.h>
template<
RepresentationOf<quantity_spec> ToRep,
UnitOf<quantity_spec> ToU>
requires detail::RepConstructibleFrom<ToRep, rep> && detail::ImplicitConversion<unit, rep, ToU{}, ToRep>
[[nodiscard]]
constexpr
QuantityOf<quantity_spec> auto
in(ToU to_u) const;
The equivalent quantity expressed in to_u with representation type ToRep.
The return value should not be discarded.
| Name | Description |
|---|---|
| to_u | the target unit |