Returns this quantity point re-expressed in another unit and representation type, applying an explicit rounding policy.
Declared in <mp-units/framework/quantity_point.h>
template<
RepresentationOf<quantity_spec> ToRep,
UnitOf<quantity_spec> ToU,
RoundingPolicy Policy>
requires std::constructible_from<ToRep, rep> && detail::ExplicitlyCastable<unit, ToU{}, ToRep> &&
detail::ValidRoundingPolicyFor<Policy, rep, ToRep>
[[nodiscard]]
constexpr
QuantityPointOf<quantity_spec> auto
in(
ToU to_u,
Policy policy) const;
The equivalent quantity point expressed in to_u with representation type ToRep.
The return value should not be discarded.
| Name | Description |
|---|---|
| to_u | the target unit |
| policy | the rounding policy to apply when the conversion is not exact |