xieite ::neg ()
Defined in fragment xieite :neg
(header-only:
<xieite/math/neg.hpp>
)
Checks whether a number is negative. Always returns
false
for unsigned integers.Can be used to avoid the
-Wtype-limits
warning.Declaration
template <xieite ::is_arith T > [[nodiscard ]]constexpr bool neg (T value )noexcept ;
Example
Output:import xieite ;int main () {xieite ::dump (xieite ::neg (5u )); }
View in Compiler Explorerfalse