Go to the documentation of this file.
17 #ifndef VCSN_MISC_LIMITS_HH
18 # define VCSN_MISC_LIMITS_HH
45 : std::numeric_limits<T>
49 static const bool is_specialized =
false;
55 static const int digits =
sizeof (bool)*8;
56 static const int digits10 = 1;
57 static const bool is_specialized =
true;
58 static bool min () throw () {
return false; }
59 static bool max () throw () {
return false; }
60 static const bool has_infinity =
false;
61 static bool infinity () throw () {
return false; }
62 static const bool has_quiet_NaN =
false;
63 static bool quiet_NaN () throw ()
64 {
return static_cast<bool> (0); }
65 static const bool is_signed =
false;
66 static const bool is_integer =
true;
67 static const bool is_exact =
true;
68 static const int radix = 2;
69 static const bool is_iec559 =
true;
70 static const bool is_bounded =
true;
71 static const bool is_modulo =
true;
75 struct limits<signed char>
77 static const int digits =
sizeof (
signed char)*8 - 1;
78 static const int digits10 = 3;
79 static const bool is_specialized =
true;
80 static signed char min () throw () {
return SCHAR_MIN; }
81 static signed char max () throw () {
return SCHAR_MAX; }
82 static const bool is_signed =
true;
83 static const bool is_integer =
true;
84 static const bool is_exact =
true;
85 static const int radix = 2;
86 static const bool has_infinity =
false;
87 static signed char infinity () throw ()
88 {
return static_cast<signed char> (0); }
89 static const bool has_quiet_NaN =
false;
90 static signed char quiet_NaN () throw ()
91 {
return static_cast<signed char> (0); }
92 static const bool is_iec559 =
false;
93 static const bool is_bounded =
true;
94 static const bool is_modulo =
false;
98 struct limits<unsigned char>
100 static const int digits =
sizeof (
unsigned char)*8;
101 static const int digits10 = 3;
102 static const bool is_specialized =
true;
103 static unsigned char min () throw () {
return 0; }
104 static unsigned char max () throw () {
return UCHAR_MAX; }
105 static const bool is_signed =
false;
106 static const bool is_integer =
true;
107 static const bool is_exact =
true;
108 static const int radix = 2;
109 static const bool has_infinity =
false;
110 static unsigned char infinity () throw ()
111 {
return static_cast<unsigned char> (0); }
112 static const bool has_quiet_NaN =
false;
113 static unsigned char quiet_NaN () throw ()
114 {
return static_cast<unsigned char> (0); }
115 static const bool is_iec559 =
false;
116 static const bool is_bounded =
true;
117 static const bool is_modulo =
true;
123 static const int digits =
sizeof (int)*8 - 1;
124 static const int digits10 = 19;
125 static const bool is_specialized =
true;
126 static int min () throw () {
return INT_MIN; }
127 static int max () throw () {
return INT_MAX; }
128 static const bool is_signed =
true;
129 static const bool is_integer =
true;
130 static const bool is_exact =
true;
131 static const int radix = 2;
132 static const bool has_infinity =
false;
133 static int infinity () throw ()
134 {
return static_cast<int> (0); }
135 static const bool has_quiet_NaN =
false;
136 static int quiet_NaN () throw ()
137 {
return static_cast<int> (0); }
138 static const bool is_iec559 =
true;
139 static const bool is_bounded =
true;
140 static const bool is_modulo =
false;
144 struct limits<unsigned int>
146 static const int digits =
sizeof (
unsigned int)*8;
147 static const int digits10 = 19;
148 static const bool is_specialized =
true;
149 static unsigned int min () throw () {
return 0; }
150 static unsigned int max () throw () {
return UINT_MAX; }
151 static const bool is_signed =
false;
152 static const bool is_integer =
true;
153 static const bool is_exact =
true;
154 static const int radix = 2;
155 static const bool has_infinity =
false;
156 static unsigned int infinity () throw ()
157 {
return static_cast<unsigned int> (0); }
158 static const bool has_quiet_NaN =
false;
159 static unsigned int quiet_NaN () throw ()
160 {
return static_cast<unsigned int> (0); }
161 static const bool is_iec559 =
true;
162 static const bool is_bounded =
true;
163 static const bool is_modulo =
true;
169 static const int digits =
sizeof (float)*8;
170 static const int digits10 = 33;
171 static const bool is_specialized =
true;
172 static float min () throw () {
return -HUGE_VAL; }
173 static float max () throw () {
return HUGE_VAL; }
174 static const bool is_signed =
true;
175 static const bool is_integer =
false;
176 static const bool is_exact =
false;
177 static const int radix = 2;
178 static const bool has_infinity =
true;
179 static float infinity () throw ()
181 static const bool has_quiet_NaN =
true;
182 static float quiet_NaN () throw ()
184 static const bool is_iec559 =
false;
185 static const bool is_bounded =
false;
186 static const bool is_modulo =
false;
190 struct limits<double>
192 static const int digits =
sizeof (float)*8;
193 static const int digits10 = 33;
194 static const bool is_specialized =
true;
195 static float min () throw () {
return -HUGE_VAL; }
196 static float max () throw () {
return HUGE_VAL; }
197 static const bool is_signed =
true;
198 static const bool is_integer =
false;
199 static const bool is_exact =
false;
200 static const int radix = 2;
201 static const bool has_infinity =
true;
202 static float infinity () throw ()
204 static const bool has_quiet_NaN =
true;
205 static float quiet_NaN () throw ()
207 static const bool is_iec559 =
false;
208 static const bool is_bounded =
false;
209 static const bool is_modulo =
false;
218 #endif // ! VCSN_MISC_LIMITS_HH