mp_units::quantity::operator Q_¶
Conversion to Q_
Synopsis¶
Declared in <mp-units/framework/quantity.h>
template<typename Q_, QuantityLike Q = std::remove_cvref_t<Q_>>
requires detail::QuantityConstructibleFrom<detail::quantity_like_type<Q>, quantity>
[[nodiscard]] constexpr explicit(quantity_like_traits<Q>::explicit_export ||
!std::convertible_to<quantity<R, Rep>, detail::quantity_like_type<Q>>)
operator Q_() const noexcept(/* see-below */);
Exception specification¶
This function is potentially-throwing unless noexcept(quantity_like_traits<Q>::from_numerical_value(this->numerical_value_is_an_implementation_detail_)) && std::is_nothrow_copy_constructible_v<rep>.
Return Value¶
The object converted to Q_
Note
The return value should not be discarded.