Skip to content

mp_units::utility::possibly_within

Checks whether the expanded uncertainty interval of a measured quantity, or of a measured point, overlaps the limits

Synopsis

Declared in <mp-units/utility/uncertain.h>

template<typename Val, typename Lower, typename Upper>
  requires detail::BoundedBy<Val, Lower, Upper, uncertain>
[[nodiscard]] constexpr bool possibly_within(Val const& val, Lower const& lower_limit,
                                             Upper const& upper_limit,
                                             value_type coverage_factor);

Note

This function is a hidden friend of uncertain, declared only inside that class: it can be found only through argument-dependent lookup.

Description

The quantity form of possibly_within. The limits are exact, and are compared in their common unit with the value.

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
coverage_factorThe coverage factor, 2 (about 95 %) by default