---
name: "_Maxof"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/_Maxof"
---

# \_Maxof(3)

limits of an integer type

## NAME

\_Maxof, \_Minof - limits of an integer type

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
T _Maxof(typename T);
T _Minof(typename T);
```

## DESCRIPTION

These operators return the maximum or minimum representable value of the operand integer type.

If the operand is not an integer type, it produces a compilation error.

## RETURN VALUE

The maximum or minimum representable value of the operand integer type.

The result is an integer constant expression of the same type as the operand.

## STANDARDS

GNU.

## HISTORY

gcc 16.

## EXAMPLES

```
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
int
main(void)
{
	static_assert(_Maxof(long) == LONG_MAX);
	exit(EXIT_SUCCESS);
}
```

## SEE ALSO

[**operator**(7)](/operator/7.md)
