summaryrefslogtreecommitdiffstats
path: root/man3/static_assert.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/static_assert.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/static_assert.3')
-rw-r--r--man3/static_assert.314
1 files changed, 7 insertions, 7 deletions
diff --git a/man3/static_assert.3 b/man3/static_assert.3
index 86c6673..a81306d 100644
--- a/man3/static_assert.3
+++ b/man3/static_assert.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH static_assert 3 2023-05-03 "Linux man-pages 6.05.01"
+.TH static_assert 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
static_assert, _Static_assert \- fail compilation if assertion is false
.SH LIBRARY
@@ -11,9 +11,9 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <assert.h>
-.PP
+.P
.BI "void static_assert(scalar " constant-expression ", const char *" msg );
-.PP
+.P
/* Since C23: */
.BI "void static_assert(scalar " constant-expression );
.fi
@@ -23,14 +23,14 @@ This macro is similar to
but it works at compile time,
generating a compilation error (with an optional message)
when the input is false (i.e., compares equal to zero).
-.PP
+.P
If the input is nonzero,
no code is emitted.
-.PP
+.P
.I msg
must be a string literal.
Since C23, this argument is optional.
-.PP
+.P
There's a keyword,
.BR \%_Static_assert (),
that behaves identically,
@@ -57,7 +57,7 @@ a macro
can be written in terms of
.BR \%static_assert ().
The following program uses the macro to get the size of an array safely.
-.PP
+.P
.in +4n
.\" SRC BEGIN (must_be.c)
.EX