force_in overloads

Synopses

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

Deprecated. Returns this quantity point re‐expressed with another representation type, truncating if inexact.

template<RepresentationOf<quantity_spec> ToRep>
requires std::constructible_from<ToRep, rep>
[[deprecated("2.6.0: use `in<Rep>(policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]]
constexpr
QuantityPointOf<quantity_spec> auto
force_in() const;

Deprecated. Returns this quantity point re‐expressed in another unit, truncating if inexact.

template<UnitOf<quantity_spec> ToU>
requires detail::ExplicitlyCastable<unit, ToU{}, rep>
[[deprecated("2.6.0: use `in(unit, policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]]
constexpr
QuantityPointOf<quantity_spec> auto
force_in(ToU to_u) const;

Deprecated. Returns this quantity point re‐expressed in another unit and representation type, truncating if inexact.

template<
    RepresentationOf<quantity_spec> ToRep,
    UnitOf<quantity_spec> ToU>
requires std::constructible_from<ToRep, rep> && detail::ExplicitlyCastable<unit, ToU{}, rep>
[[deprecated("2.6.0: use `in<Rep>(unit, policy)` with a rounding policy (e.g. `truncated`) instead"), nodiscard]]
constexpr
QuantityPointOf<quantity_spec> auto
force_in(ToU to_u) const;
Warning

Deprecated. Use of this entity is allowed but discouraged.

Return Value

  • The equivalent quantity point with representation type ToRep.

  • The equivalent quantity point expressed in to_u.

  • The equivalent quantity point expressed in to_u with representation type ToRep.

Note

The return value should not be discarded.

Parameters

Name

Description

to_u

the target unit

Created with MrDocs