SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
limits.h
Go to the documentation of this file.
1
#ifndef _STD_LIMITS_H
2
#define _STD_LIMITS_H
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
#define CHAR_BIT 8
9
10
#define SCHAR_MIN (-0x7F - 1)
11
#define SCHAR_MAX 0x7F
12
#define UCHAR_MAX 0xFF
13
14
#define CHAR_MIN 0
15
#define CHAR_MAX SCHAR_MAX
16
17
#define SHRT_MIN (-0x7FFF - 1)
18
#define SHRT_MAX 0x7FFF
19
#define USHRT_MAX 0xFFFF
20
21
#define INT_MIN (-0x7FFFFFFF - 1)
22
#define INT_MAX 0x7FFFFFFF
23
#define UINT_MAX 0xFFFFFFFF
24
25
#define LONG_MIN (-0x7FFFFFFFL - 1)
26
#define LONG_MAX 0x7FFFFFFFL
27
#define ULONG_MAX 0xFFFFFFFFUL
28
29
#define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1)
30
#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
31
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
32
33
#ifdef __cplusplus
34
}
35
36
namespace
std {
37
template
<
typename
T>
class
numeric_limits {
38
public
:
39
static
inline
T min();
40
static
inline
T max();
41
};
42
43
template
<>
class
numeric_limits<char> {
44
public
:
45
static
inline
char
min()
46
{
47
return
-0x80;
48
}
49
static
inline
char
max()
50
{
51
return
0x7F;
52
}
53
};
54
55
template
<>
class
numeric_limits<short> {
56
public
:
57
static
inline
short
min()
58
{
59
return
-0x8000;
60
}
61
static
inline
short
max()
62
{
63
return
0x7FFF;
64
}
65
};
66
67
template
<>
class
numeric_limits<int> {
68
public
:
69
static
inline
int
min()
70
{
71
return
-0x80000000;
72
}
73
static
inline
int
max()
74
{
75
return
0x7FFFFFFF;
76
}
77
};
78
79
template
<>
class
numeric_limits<long> {
80
public
:
81
static
inline
long
min()
82
{
83
return
-0x80000000;
84
}
85
static
inline
long
max()
86
{
87
return
0x7FFFFFFF;
88
}
89
};
90
91
template
<>
class
numeric_limits<unsigned char> {
92
public
:
93
static
inline
unsigned
char
min()
94
{
95
return
0x0;
96
}
97
static
inline
unsigned
char
max()
98
{
99
return
0xFF;
100
}
101
};
102
103
template
<>
class
numeric_limits<unsigned short> {
104
public
:
105
static
inline
unsigned
short
min()
106
{
107
return
0x0;
108
}
109
static
inline
unsigned
short
max()
110
{
111
return
0xFFFF;
112
}
113
};
114
115
template
<>
class
numeric_limits<unsigned int> {
116
public
:
117
static
inline
unsigned
int
min()
118
{
119
return
0x0;
120
}
121
static
inline
unsigned
int
max()
122
{
123
return
0xFFFFFFFF;
124
}
125
};
126
127
template
<>
class
numeric_limits<unsigned long> {
128
public
:
129
static
inline
unsigned
long
min()
130
{
131
return
0x0;
132
}
133
static
inline
unsigned
long
max()
134
{
135
return
0xFFFFFFFF;
136
}
137
};
138
139
}
// namespace std
140
#endif
141
#endif
src
MSL
limits.h
Generated by
1.17.0