Standard library header <climits>
From zh.cppreference.net
该头文件最初作为 <limits.h> 存在于C标准库中。
此头文件属于 类型支持 库的一部分,更具体地说,它是 C数值限制接口 的组成部分。
宏
|
CHAR_BIT
|
字节的位宽
(宏常量) |
|
MB_LEN_MAX
|
多字节字符的最大字节数
(宏常量) |
|
CHAR_MIN
|
char
的最小值
(宏常量) |
|
CHAR_MAX
|
char
的最大值
(宏常量) |
|
SCHAR_MIN
SHRT_MIN
INT_MIN
LONG_MIN
LLONG_MIN
(C++11)
|
分别为
signed
char
、
short
、
int
、
long
和
long
long
的最小值
(宏常量) |
|
SCHAR_MAX
SHRT_MAX
INT_MAX
LONG_MAX
LLONG_MAX
(C++11)
|
分别为
signed
char
、
short
、
int
、
long
和
long
long
的最大值
(宏常量) |
|
UCHAR_MAX
USHRT_MAX
UINT_MAX
ULONG_MAX
ULLONG_MAX
(C++11)
|
分别为
unsigned
char
、
unsigned
short
、
unsigned
int
、
unsigned long 和 unsigned long long 的最大值 (宏常量) |
概要
// all freestanding
#define BOOL_WIDTH /* see description */
#define CHAR_BIT /* see description */
#define CHAR_WIDTH /* see description */
#define SCHAR_WIDTH /* see description */
#define UCHAR_WIDTH /* see description */
#define USHRT_WIDTH /* see description */
#define SHRT_WIDTH /* see description */
#define UINT_WIDTH /* see description */
#define INT_WIDTH /* see description */
#define ULONG_WIDTH /* see description */
#define LONG_WIDTH /* see description */
#define ULLONG_WIDTH /* see description */
#define LLONG_WIDTH /* see description */
#define SCHAR_MIN /* see description */
#define SCHAR_MAX /* see description */
#define UCHAR_MAX /* see description */
#define CHAR_MIN /* see description */
#define CHAR_MAX /* see description */
#define MB_LEN_MAX /* see description */
#define SHRT_MIN /* see description */
#define SHRT_MAX /* see description */
#define USHRT_MAX /* see description */
#define INT_MIN /* see description */
#define INT_MAX /* see description */
#define UINT_MAX /* see description */
#define LONG_MIN /* see description */
#define LONG_MAX /* see description */
#define ULONG_MAX /* see description */
#define LLONG_MIN /* see description */
#define LLONG_MAX /* see description */
#define ULLONG_MAX /* see description */