]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man3/_Maxof.3: Add page
authorAlejandro Colomar <alx@kernel.org>
Mon, 1 Dec 2025 18:16:44 +0000 (19:16 +0100)
committerAlejandro Colomar <alx@kernel.org>
Mon, 1 Dec 2025 21:21:35 +0000 (22:21 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/_Maxof.3 [new file with mode: 0644]

diff --git a/man/man3/_Maxof.3 b/man/man3/_Maxof.3
new file mode 100644 (file)
index 0000000..ed0547d
--- /dev/null
@@ -0,0 +1,51 @@
+.\" Copyright, the authors of the Linux man-pages project
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH _Maxof 3 (date) "Linux man-pages (unreleased)"
+.SH NAME
+_Maxof, _Minof
+\-
+limits of an integer type
+.SH LIBRARY
+Standard C library
+.RI ( libc )
+.SH SYNOPSIS
+.nf
+.BI T\~_Maxof(typename\~ T );
+.BI T\~_Minof(typename\~ T );
+.fi
+.SH DESCRIPTION
+These operators return
+the maximum or minimum representable value
+of the operand integer type.
+.P
+If the operand is not an integer type,
+it produces a compilation error.
+.SH RETURN VALUE
+The maximum or minimum representable value
+of the operand integer type.
+.P
+The result is an integer constant expression
+of the same type as the operand.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+gcc 16.
+.SH EXAMPLES
+.\" SRC BEGIN (maxof.c)
+.EX
+#include <assert.h>
+#include <limits.h>
+#include <stdlib.h>
+\&
+int
+main(void)
+{
+       static_assert(_Maxof(long) == LONG_MAX);
+       exit(EXIT_SUCCESS);
+}
+.EE
+.\" SRC END
+.SH SEE ALSO
+.BR operator (7)