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;

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;

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;

Return Value

  • A reference to the stored numerical value.

  • A const reference to the stored numerical value.

Parameters

Name

Description

u

a unit equivalent to unit

Created with MrDocs