Checks whether a quantity specification is tagged as non‐negative

Synopsis

Declared in <mp‐units/framework/quantity_spec_conversion.h>

template<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 should not be discarded.

Template Parameters

Name

Description

Q

quantity specification type

Parameters

Name

Description

q

quantity specification value

Created with MrDocs