[#mp_units-check_non_negative] = xref:mp_units.adoc[mp_units]::check_non_negative :relfileprefix: ../ :mrdocs: Policy that checks the value is ≥ 0 and reports violations. == Synopsis Declared in `<mp‐units/overflow_policies.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct check_non_negative; ---- == Description Intended for quantities that are inherently non‐negative (e.g., _length_, _mass_, _duration_). Automatically applied to `natural_point_origin<QS>` when `QS` is tagged `non_negative` in the ISQ. If the quantity's representation type has a `constraint_violation_handler` specialization, the handler's `on_violation()` is called on negative values (providing guaranteed enforcement regardless of build mode). Otherwise, falls back to `MP_UNITS_EXPECTS`, which may be disabled in release builds. == Member Functions [cols=1] |=== | Name | xref:mp_units/check_non_negative/operator_call.adoc[`operator()`] |=== == Data Members [cols=1] |=== | Name | xref:mp_units/check_non_negative/min.adoc[`min`] |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#