mp_units::quantity_point::in

Returns this quantity point re-expressed with another representation type, applying an explicit rounding policy.

Synopsis

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

template<
    RepresentationOf<quantity_spec> ToRep,
    RoundingPolicy Policy>
requires std::constructible_from<ToRep, rep> && detail::ValidRoundingPolicyFor<Policy, rep, ToRep>
[[nodiscard]]
constexpr
QuantityPointOf<quantity_spec> auto
in(Policy policy) const;

Return Value

The equivalent quantity point with representation type ToRep.

NOTE

The return value should not be discarded.

Parameters

NameDescription
policythe rounding policy to apply when the conversion is not exact