mp_units::quantity::numerical_value_ref_in

numerical_value_ref_in overloads

Synopses

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

Returns a mutable reference to the numerical value, in a unit equivalent to unit.

template<Unit U>
requires (equivalent(U{}, unit))
[[nodiscard]]
constexpr
rep&
numerical_value_ref_in(U u) & noexcept;
» more...

Returns a const reference to the numerical value, in a unit equivalent to unit.

template<Unit U>
requires (equivalent(U{}, unit))
[[nodiscard]]
constexpr
rep const&
numerical_value_ref_in(U u) const & noexcept;
» more...

Deleted overload that prevents forming a reference into a temporary quantity.

template<Unit U>
requires (equivalent(U{}, unit))
constexpr
rep const&&
numerical_value_ref_in(U u) const && noexcept = delete;
» more...

Return Value

  • A reference to the stored numerical value.
  • A const reference to the stored numerical value.

Parameters

NameDescription
ua unit equivalent to unit