mp_units::quantity_point::is_within_bounds¶
Tells whether constructing quantity_point{q, po} would pass the bounds of the point's origin.
Synopses¶
Declared in <mp-units/framework/quantity_point.h>
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_make for the same test returning the constructed point