[#mp_units-clamp_to_range] = xref:mp_units.adoc[mp_units]::clamp_to_range :relfileprefix: ../ :mrdocs: Policy that clamps the value to [min, max]. == Synopsis Declared in `<mp‐units/overflow_policies.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/Quantity.adoc[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 [cols=1] |=== | Name | xref:mp_units/clamp_to_range/operator_call.adoc[`operator()`] |=== == Data Members [cols=1] |=== | Name | xref:mp_units/clamp_to_range/max.adoc[`max`] | xref:mp_units/clamp_to_range/min.adoc[`min`] |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#