Skip to content

mp_units::utility::certainly_within

Checks whether the whole expanded uncertainty interval of a measured quantity, or of a measured point, lies within 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 certainly_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 certainly_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