| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 4 |
.\" |
| 5 |
.TH _Maxof 3 2025-12-01 "Linux man-pages 6.18" |
| 6 |
.SH NAME |
| 7 |
_Maxof, _Minof |
| 8 |
\- |
| 9 |
limits of an integer type |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.BI T\~_Maxof(typename\~ T ); |
| 16 |
.BI T\~_Minof(typename\~ T ); |
| 17 |
.fi |
| 18 |
.SH DESCRIPTION |
| 19 |
These operators return |
| 20 |
the maximum or minimum representable value |
| 21 |
of the operand integer type. |
| 22 |
.P |
| 23 |
If the operand is not an integer type, |
| 24 |
it produces a compilation error. |
| 25 |
.SH RETURN VALUE |
| 26 |
The maximum or minimum representable value |
| 27 |
of the operand integer type. |
| 28 |
.P |
| 29 |
The result is an integer constant expression |
| 30 |
of the same type as the operand. |
| 31 |
.SH STANDARDS |
| 32 |
GNU. |
| 33 |
.SH HISTORY |
| 34 |
gcc 16. |
| 35 |
.SH EXAMPLES |
| 36 |
.\" SRC BEGIN (maxof.c) |
| 37 |
.EX |
| 38 |
#include <assert.h> |
| 39 |
#include <limits.h> |
| 40 |
#include <stdlib.h> |
| 41 |
\& |
| 42 |
int |
| 43 |
main(void) |
| 44 |
{ |
| 45 |
static_assert(_Maxof(long) == LONG_MAX); |
| 46 |
exit(EXIT_SUCCESS); |
| 47 |
} |
| 48 |
.EE |
| 49 |
.\" SRC END |
| 50 |
.SH SEE ALSO |
| 51 |
.BR operator (7) |