mp_units::clamp_to_range::operator()

Clamps v to [min, max].

Synopsis

Declared in <mp-units/overflow_policies.h>

template<Quantity V>
constexpr
V
operator()(V v) const;

Return Value

v if it is within bounds, otherwise the nearest boundary

Parameters

NameDescription
vthe value to clamp