aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/_Maxof.3
blob: ed0547d66d4b027672ac5f8a80d55277fc4d7f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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)