P99

◆ P99_IS_NULLPTR_CONSTANT

#define P99_IS_NULLPTR_CONSTANT (   PEXP)    P99_GENERIC_NULLPTR_CONSTANT((PEXP), true, false)

Test if the expression PEXP is a null pointer constant in the sense of the C standard.

A null pointer constant is any compile time constant of integral type (that is of integer or enum type) eventually cast to void*.

Remarks
Passing other integral values than 0 should result in a compile time diagnostic about type mismatch.
A compile time constant of value 0 that is of a qualified version of void, e.g void const*

should result in the value false.

Remarks
A const qualified variable of value 0 that is of integral type or void* should also result in the value false.
PEXP will only be evaluated for its type, not for its value.
The evaluation of this macro by itself results in a compile time expression of value false or true.
See also
P99_IS_NULLPTR
P99_IS_INTEGRAL_CONSTANT

Definition at line 1740 of file p99_generic.h.