[#mp_units-is_non_negative]
= xref:mp_units.adoc[mp&lowbar;units]::is&lowbar;non&lowbar;negative
:relfileprefix: ../
:mrdocs:

Checks whether a quantity specification is tagged as non&hyphen;negative

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;quantity&lowbar;spec&lowbar;conversion&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/QuantitySpec.adoc[QuantitySpec] Q&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
bool
is&lowbar;non&lowbar;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]#
