mp_units::clamp_to_range

Policy that clamps the value to [min, max].

Synopsis

Declared in <mp-units/overflow_policies.h>
template<Quantity Q>
struct clamp_to_range;

Description

Saturates out-of-range values to the nearest boundary. Use when you want to "correct" invalid values rather than signal an error.

Member Functions

Name
operator()

Data Members

Name
max
min