Skip to content

mp_units::quantity_point::operator QP_

Conversion to QP_

Synopsis

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

template<typename QP_, QuantityPointLike QP = std::remove_cvref_t<QP_>>
  requires(point_origin == quantity_point_like_traits<QP>::point_origin) &&
          std::convertible_to<quantity_type, quantity<quantity_point_like_traits<QP>::reference,
                                                      typename quantity_point_like_traits<QP>::rep>>
[[nodiscard]] constexpr explicit(
  quantity_point_like_traits<QP>::explicit_export ||
  !std::convertible_to<
    quantity_type, quantity<quantity_point_like_traits<QP>::reference, typename quantity_point_like_traits<QP>::rep>>)
operator QP_() && noexcept(/* see-below */);

Exception specification

This function is potentially-throwing unless noexcept(quantity_point_like_traits<QP>::from_numerical_value(this->quantity_from_origin_is_an_implementation_detail_.numerical_value_is_an_implementation_detail_)) && std::is_nothrow_move_constructible_v<rep>.

Return Value

The object converted to QP_

Note

The return value should not be discarded.