Constructors
Declared in <mp-units/framework/quantity_point.h>
Default constructor. Leaves the underlying quantity default-initialized.
[[nodiscard]]
quantity_point() = default;
» more...
Converting constructor from a quantity point anchored to a different absolute point origin.
template<QuantityPoint QP>
requires (!QuantityPointOf<QP, absolute_point_origin>) && requires(const QP& src) {
{ src.point_for(point_origin) } -> QuantityPointOf<point_origin>;
quantity_type{src.point_for(point_origin) - point_origin};
}
[[nodiscard]]
constexpr
explicit
quantity_point(QP const& qp);
» more...
Constructs a quantity point from an external quantity-point-like type via quantity_point_like_traits.
template<QuantityPointLike QP>
requires (quantity_point_like_traits<QP>::point_origin == point_origin) &&
std::constructible_from<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_import || !std::convertible_to<quantity<quantity_point_like_traits<QP>::reference, typename quantity_point_like_traits<QP>::rep>, quantity_type>)
quantity_point(QP const& qp);
» more...
Converting constructor from another quantity point that shares this one's absolute point origin.
template<QuantityPointOf<absolute_point_origin> QP>
requires std::constructible_from<quantity_type, typename QP::quantity_type>
[[nodiscard]]
constexpr
explicit(!std::convertible_to<typename QP::quantity_type, quantity_type>)
quantity_point(QP const& qp);
» more...
Constructs a quantity point from a quantity, measured from the default point origin.
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))
[[nodiscard]]
constexpr
explicit
quantity_point(FwdQ&& q);
» more...
Constructs a quantity point from a quantity measured from this point's own origin.
template<
typename FwdQ,
QuantityOf<quantity_spec> Q = std::remove_cvref_t<FwdQ>>
requires std::constructible_from<quantity_type, FwdQ>
[[nodiscard]]
constexpr
quantity_point(
FwdQ&& q,
decltype(PO) po);
» more...
Constructs a quantity point from a quantity measured from another point origin that shares this one's absolute point origin.
template<
typename FwdQ,
PointOrigin PO2,
Quantity Q = std::remove_cvref_t<FwdQ>>
requires PointOriginFor<PO2, Q::quantity_spec> && std::constructible_from<quantity_type, FwdQ> &&
detail::SameAbsolutePointOriginAs<PO2, PO>
[[nodiscard]]
constexpr
quantity_point(
FwdQ&& q,
PO2 po);
» more...
The return value should not be discarded.
| Name | Description |
|---|---|
| qp | the source quantity point to convert from |
| q | the quantity giving the offset from point_origin |
| po | the point origin the quantity is measured from, equal to point_origin |