template<typename T>
concept PointOrigin = SymbolicConstant<T> && std::derived_from<T, point-origin-interface>;
template<typename T, auto QS>
concept PointOriginFor = PointOrigin<T> && QuantitySpecOf<decltype(QS), T::quantity-spec>;
template<typename T, auto V>
concept SameAbsolutePointOriginAs = // exposition only
PointOrigin<T> && PointOrigin<decltype(V)> && same-absolute-point-origins(T{}, V);
template<PointOrigin PO, typename FwdQ,
QuantityOf<PO::quantity-spec> Q = std::remove_cvref_t<FwdQ>>
friend constexpr quantity_point<Q::reference, PO{}, typename Q::rep> operator+(PO, FwdQ&& q);
template<Quantity FwdQ, PointOrigin PO,
QuantityOf<PO::quantity-spec> Q = std::remove_cvref_t<FwdQ>>
friend constexpr quantity_point<Q::reference, PO{}, typename Q::rep> operator+(FwdQ&& q, PO);
template<PointOrigin PO, Quantity Q>
requires ReferenceOf<decltype(auto(Q::reference)), PO::quantity-spec>
friend constexpr QuantityPoint auto operator-(PO po, const Q& q)
requires requires { -q; };
template<PointOrigin PO1, SameAbsolutePointOriginAs<PO1{}> PO2>
requires see below
friend constexpr Quantity auto operator-(PO1 po1, PO2 po2);
template<PointOrigin PO1, PointOrigin PO2>
friend consteval bool operator==(PO1 po1, PO2 po2);
template<PointOrigin PO1, PointOrigin PO2>
consteval bool same-absolute-point-origins(PO1 po1, PO2 po2); // exposition only
template<Reference R>
consteval PointOriginFor<get_quantity_spec(R{})> auto default_point_origin(R);
template<typename T>
concept QuantityPointLike =
!QuantityPoint<T> &&
qty-like-impl<T, quantity_point_like_traits> && // see [qty.like]
requires {
typename quantity_point<quantity_point_like_traits<T>::reference,
quantity_point_like_traits<T>::point_origin,
typename quantity_point_like_traits<T>::rep>;
};
static constexpr quantity_point min() noexcept
requires see below;
static constexpr quantity_point max() noexcept
requires see below;
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));
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);
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);
template<QuantityPointLike QP>
requires see below
constexpr explicit(see below) quantity_point(const QP& qp);
template<SameAbsolutePointOriginAs<absolute_point_origin> NewPO>
constexpr QuantityPointOf<(NewPO{})> auto point_for(NewPO new_origin) const;
template<UnitCompatibleWith<unit, quantity_spec> ToU>
requires see below
constexpr QuantityPointOf<quantity_spec> auto in(ToU) const;
template<RepresentationOf<quantity_spec> ToRep>
requires see below
constexpr QuantityPointOf<quantity_spec> auto in() const;
template<RepresentationOf<quantity_spec> ToRep,
UnitCompatibleWith<unit, quantity_spec> ToU>
requires see below
constexpr QuantityPointOf<quantity_spec> auto in(ToU) const;
template<UnitCompatibleWith<unit, quantity_spec> ToU>
requires see below
constexpr QuantityPointOf<quantity_spec> auto force_in(ToU) const;
template<RepresentationOf<quantity_spec> ToRep>
requires see below
constexpr QuantityPointOf<quantity_spec> auto force_in() const;
template<RepresentationOf<quantity_spec> ToRep,
UnitCompatibleWith<unit, quantity_spec> ToU>
requires see below
constexpr QuantityPointOf<quantity_spec> auto force_in(ToU) const;
template<PointOrigin PO2>
requires(PO2{} == point_origin)
constexpr quantity_type& quantity_ref_from(PO2) & noexcept;
template<PointOrigin PO2>
requires(PO2{} == point_origin)
constexpr const quantity_type& quantity_ref_from(PO2) const & noexcept;
template<PointOrigin PO2>
requires requires(const quantity_point qp) { qp - PO2{}; }
constexpr Quantity auto quantity_from(PO2 rhs) const;
template<QuantityPointOf<absolute_point_origin> QP>
constexpr Quantity auto quantity_from(const QP& rhs) const;
template<typename QP_, QuantityPointLike QP = std::remove_cvref_t<QP_>>
requires see below
constexpr explicit(see below) operator QP_() const & noexcept(see below);
template<typename QP_, QuantityPointLike QP = std::remove_cvref_t<QP_>>
requires see below
constexpr explicit(see below) operator QP_() && noexcept(see below);
constexpr quantity_point operator++(int)
requires see below;
constexpr quantity_point operator--(int)
requires see below;
template<Mutable<quantity_point> QP, auto R2, typename Rep2>
requires see below
friend constexpr decltype(auto) operator+=(QP&& qp, const quantity<R2, Rep2>& q);
template<Mutable<quantity_point> QP, auto R2, typename Rep2>
requires see below
friend constexpr decltype(auto) operator-=(QP&& qp, const quantity<R2, Rep2>& q);
template<std::derived_from<quantity_point> QP, auto R2, typename Rep2>
friend constexpr QuantityPoint auto operator+(const QP& qp, const quantity<R2, Rep2>& q)
requires see below;
template<std::derived_from<quantity_point> QP, auto R2, typename Rep2>
friend constexpr QuantityPoint auto operator+(const quantity<R2, Rep2>& q, const QP& qp)
requires see below;
template<std::derived_from<quantity_point> QP, auto R2, typename Rep2>
friend constexpr QuantityPoint auto operator-(const QP& qp, const quantity<R2, Rep2>& q)
requires see below;
template<std::derived_from<quantity_point> QP, QuantityPointOf<absolute_point_origin> QP2>
friend constexpr Quantity auto operator-(const QP& lhs, const QP2& rhs)
requires see below;
template<std::derived_from<quantity_point> QP, PointOrigin PO2>
requires see below
friend constexpr Quantity auto operator-(const QP& qp, PO2 po);
template<std::derived_from<quantity_point> QP, PointOrigin PO2>
requires see below
friend constexpr Quantity auto operator-(PO2 po, const QP& qp);
template<std::derived_from<quantity_point> QP, QuantityPointOf<absolute_point_origin> QP2>
requires see below
friend constexpr bool operator==(const QP& lhs, const QP2& rhs);
template<std::derived_from<quantity_point> QP, QuantityPointOf<absolute_point_origin> QP2>
requires see below
friend constexpr auto operator<=>(const QP& lhs, const QP2& rhs);
template<typename FwdRep,
RepresentationOf<get_quantity_spec(R{})> Rep = std::remove_cvref_t<FwdRep>>
constexpr quantity_point<R{}, default_point_origin(R{}), Rep> operator()(FwdRep&& lhs) const;
template<QuantityPoint ToQP, typename FwdFromQP,
QuantityPoint FromQP = std::remove_cvref_t<FwdFromQP>>
requires see below
constexpr QuantityPoint auto sudo-cast(FwdFromQP&& qp);
template<Unit auto ToU, typename FwdQP, QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires(convertible(QP::reference, ToU))
constexpr QuantityPoint auto value_cast(FwdQP&& qp);
template<Representation ToRep, typename FwdQP, QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires RepresentationOf<ToRep, QP::quantity_spec> &&
std::constructible_from<ToRep, typename QP::rep>
constexpr quantity_point<QP::reference, QP::point_origin, ToRep> value_cast(FwdQP&& qp);
template<Unit auto ToU, Representation ToRep, typename FwdQP,
QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires see below
constexpr QuantityPoint auto value_cast(FwdQP&& qp);
template<Representation ToRep, Unit auto ToU, typename FwdQP,
QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires see below
constexpr QuantityPoint auto value_cast(FwdQP&& qp);
template<Quantity ToQ, typename FwdQP, QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires(convertible(QP::reference, ToQ::unit)) && (ToQ::quantity_spec == QP::quantity_spec) &&
std::constructible_from<typename ToQ::rep, typename QP::rep>
constexpr QuantityPoint auto value_cast(FwdQP&& qp);
template<QuantityPoint ToQP, typename FwdQP, QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires(convertible(QP::reference, ToQP::unit)) &&
(ToQP::quantity_spec == QP::quantity_spec) &&
(same-absolute-point-origins(ToQP::point_origin, QP::point_origin)) &&
std::constructible_from<typename ToQP::rep, typename QP::rep>
constexpr QuantityPoint auto value_cast(FwdQP&& qp);
template<QuantitySpec auto ToQS, typename FwdQP, QuantityPoint QP = std::remove_cvref_t<FwdQP>>
requires QuantitySpecCastableTo<QP::quantity_spec, ToQS>
constexpr QuantityPoint auto quantity_cast(FwdQP&& qp);