[#mp_units-is_non_negative] = xref:mp_units.adoc[mp_units]::is_non_negative :relfileprefix: ../ :mrdocs: Checks whether a quantity specification is tagged as non‐negative == Synopsis Declared in `<mp‐units/framework/quantity_spec_conversion.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q> [[nodiscard]] consteval bool is_non_negative(Q q); ---- == Return Value `true` if quantities of `Q` can never hold a negative value [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Template Parameters [cols="1,4"] |=== | Name| Description | *Q* | quantity specification type |=== == Parameters [cols="1,4"] |=== | Name| Description | *q* | quantity specification value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#