Next: complex.h, Previous: arpa/inet.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html
Gnulib module: assert-h
See also the Gnulib module assert
.
Portability problems fixed by Gnulib:
static_assert
, and the C11
_Static_assert
, are not supported by many platforms.
For example, GCC versions before 4.6.0 do not support _Static_assert
,
and G++ versions through at least 4.6.0 do not support static_assert
.
Portability problems not fixed by Gnulib:
_Static_assert
and C++11 static_assert
are keywords that can be used without including <assert.h>
.
The Gnulib substitutes are macros that require including <assert.h>
.
static_assert
and _Static_assert
can also
be used within a struct
or union
specifier, in place of
an ordinary declaration of a member of the struct or union. The
Gnulib substitute can be used only as an ordinary declaration.
assert
can be applied to any scalar expression.
In C89, the argument to assert
is of type int
.