_Maxof(3)

πŸ“¦
version 6.20 Β· 4 versions
, in arch rolling, nixpkgs unstable

πŸ’… _Maxof(3) β€” the limits of an integer type, bestie

Okay so real talk: this is a page from section 3 of the manual, all about _Maxof and _Minof. It's giving "tiny page, huge power." Let's get into it. πŸ¦‹

✨ NAME ✨

_Maxof, _Minof β€” limits of an integer type

πŸ“š LIBRARY πŸ“š

The Standard C library (libc). Yeah, that libc. She's everywhere. πŸ’–

🌸 SYNOPSIS 🌸

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

πŸ’œ DESCRIPTION πŸ’œ

These operators hand you back the maximum or the minimum representable value of the operand integer type. That's it. That's the whole vibe. Simple, iconic, no notes. πŸ‘‘

And if the operand is not an integer type? Not a warning, not a little shrug β€” it produces a compilation error. The compiler said "absolutely not" and meant it. 🚫

🫢 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. So like, type-accurate AND constant-expression-coded. She's doing both. Multi-talented. ✨

πŸ“ STANDARDS πŸ“

GNU.

πŸ•°οΈ HISTORY πŸ•°οΈ

gcc 16. A modern queen. Fresh off the press. πŸ’…

πŸŽ€ EXAMPLES πŸŽ€

Bestie, here's the whole thing, copy it exactly:

#include <assert.h>
#include <limits.h>
#include <stdlib.h>

int
main(void)
{
     static_assert(_Maxof(long) == LONG_MAX);
     exit(EXIT_SUCCESS);
}

Look at that static_assert just casually confirming the truth at compile time. Compile-time self-care. 🌈


πŸ‘€ SEE ALSO πŸ‘€


Lowkey important reminder: this page is from Linux man-pages 6.20, dated 2025-12-01. Go off, man-pages team. 🫑

That's the page, bestie. _Maxof, _Minof, done, dusted, compiled. Periodt. πŸ’–πŸŽ€πŸŒŸ

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms