folly::is_non_positive

Determines whether a value is non-positive, the same as x <= 0.

Synopsis

Declared in <folly/Traits.h>

template<typename T>
constexpr
bool
is_non_positive(T x);

Return Value

true if x is less than or equal to zero.

Parameters

NameDescription
xThe value to test.