mp_units::quantity_point::is_within_bounds¶
is_within_bounds overloads
Synopses¶
Declared in <mp-units/framework/quantity_point.h>
Tells whether converting qp with quantity_point{qp} would pass the bounds of the point's origin.
template<typename QP>
requires(QuantityPoint<QP> || detail::QuantityPointLike<QP>) &&
(!std::same_as<QP, quantity_point>) &&
std::constructible_from<quantity_point, const QP&> &&
(detail::bounds_exact_in<PO, quantity_type>()) &&
(detail::enforced_bounds_check<PO, quantity_type>()) &&
(!QuantityPoint<QP> || QuantityPointOf<QP, absolute_point_origin> ||
detail::projection_checks_no_bounds<QP, absolute_point_origin>())
[[nodiscard]] constexpr static bool is_within_bounds(QP const& qp);
template<typename FwdQ, QuantityOf<quantity_spec> Q = std::remove_cvref_t<FwdQ>>
requires(detail::bounds_exact_in<PO, quantity_type>()) &&
(detail::enforced_bounds_check<PO, quantity_type>()) &&
std::constructible_from<quantity_type, FwdQ> && (PO == default_point_origin(R))
[[nodiscard]] constexpr static bool is_within_bounds(FwdQ&& q);
Tells whether constructing quantity_point{q, po} would pass the bounds of the point's origin.
template<typename FwdQ, QuantityOf<quantity_spec> Q = std::remove_cvref_t<FwdQ>>
requires(detail::bounds_exact_in<PO, quantity_type>()) &&
(detail::enforced_bounds_check<PO, quantity_type>()) &&
std::constructible_from<quantity_type, FwdQ>
[[nodiscard]] constexpr static bool is_within_bounds(FwdQ&& q, decltype(PO));
Return Value¶
Note
The return value should not be discarded.
See Also¶
try_makefor the same test returning the constructed point