命名空间
变体
操作

标准库头文件 <climits>

来自 cppreference.cn
< cpp‎ | header
 
 
标准库头文件
算法
<algorithm>
<numeric>
字符串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文本处理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
数值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
时间
<chrono> (C++11)
<ctime>
C 兼容性
<ccomplex> (C++11/17/20*)
<ciso646> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此头文件最初在 C 标准库中为 <limits.h>

此头文件是类型支持库的一部分,特别是C 数值限制接口的一部分。

[编辑]

CHAR_BIT
字节的位宽
(宏常量) [编辑]
MB_LEN_MAX
多字节字符中的最大字节数
(宏常量) [编辑]
CHAR_MIN
char 的最小值
(宏常量) [编辑]
CHAR_MAX
char 的最大值
(宏常量) [编辑]
SCHAR_MINSHRT_MININT_MINLONG_MINLLONG_MIN
(C++11)
signed charshortintlonglong long 的最小值
(宏常量) [编辑]
SCHAR_MAXSHRT_MAXINT_MAXLONG_MAXLLONG_MAX
(C++11)
signed charshortintlonglong long 的最大值
(宏常量) [编辑]
UCHAR_MAXUSHRT_MAXUINT_MAXULONG_MAXULLONG_MAX
(C++11)
unsigned charunsigned shortunsigned int
unsigned longunsigned long long 的最大值
(宏常量) [编辑]

[编辑] 概要

#define CHAR_BIT      /* see definition */
#define SCHAR_MIN     /* see definition */
#define SCHAR_MAX     /* see definition */
#define UCHAR_MAX     /* see definition */
#define CHAR_MIN      /* see definition */
#define CHAR_MAX      /* see definition */
#define MB_LEN_MAX    /* see definition */
#define SHRT_MIN      /* see definition */
#define SHRT_MAX      /* see definition */
#define USHRT_MAX     /* see definition */
#define INT_MIN       /* see definition */
#define INT_MAX       /* see definition */
#define UINT_MAX      /* see definition */
#define LONG_MIN      /* see definition */
#define LONG_MAX      /* see definition */
#define ULONG_MAX     /* see definition */
#define LLONG_MIN     /* see definition */
#define LLONG_MAX     /* see definition */
#define ULLONG_MAX    /* see definition */