5 Quantities and units library [quantities]

5.7 Quantity point [qty.pt]

5.7.6 Constructors [qty.pt.cons]

template<typename FwdQ, QuantityOf<quantity_spec> Q = std::remove_cvref_t<FwdQ>> requires std::constructible_from<quantity_type, FwdQ> && (point_origin == default_point_origin(R)) && (implicitly_convertible(Q::quantity_spec, quantity_spec)) constexpr explicit quantity_point(FwdQ&& q); template<typename FwdQ, QuantityOf<quantity_spec> Q = std::remove_cvref_t<FwdQ>> requires std::constructible_from<quantity_type, FwdQ> constexpr quantity_point(FwdQ&& q, decltype(PO));
Effects: Initializes quantity-from-origin with std​::​forward<FwdQ>(q).
template<typename FwdQ, PointOrigin PO2, QuantityOf<PO2::quantity-spec> Q = std::remove_cvref_t<FwdQ>> requires std::constructible_from<quantity_type, FwdQ> && SameAbsolutePointOriginAs<PO2, PO> constexpr quantity_point(FwdQ&& q, PO2);
Effects: Equivalent to: quantity_point(quantity_point<Q::reference, PO2{}, typename Q::rep>{std::forward<FwdQ>(q), PO2{}})
template<QuantityPointOf<absolute_point_origin> QP> requires std::constructible_from<quantity_type, typename QP::quantity_type> constexpr explicit(!std::convertible_to<typename QP::quantity_type, quantity_type>) quantity_point(const QP& qp);
Effects: If point_origin == QP​::​point_origin is true, initializes quantity-from-origin with qp.quantity_ref_from(point_origin).
Otherwise, initializes quantity-from-origin with qp - point_origin.
template<QuantityPointLike QP> requires see below constexpr explicit(see below) quantity_point(const QP& qp);
Let Traits be quantity_point_like_traits<QP>.
Effects: Initializes quantity-from-origin with Traits::to_numerical_value(qp), get_unit(Traits::reference)
Remarks: The expression in the requires-clause is equivalent to: (Traits::point_origin == point_origin) && std::convertible_to<quantity<Traits::reference, typename Traits::rep>, quantity_type>
The expression inside explicit is equivalent to: Traits::explicit_import || !std::convertible_to<quantity<Traits::reference, typename Traits::rep>, quantity_type>