00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __TYPE_TRAITS_H
00016 #define __TYPE_TRAITS_H
00017
00018 #ifndef __STL_CONFIG_H
00019 #include <stl_config.h>
00020 #endif
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 struct __true_type {
00056 };
00057
00058 struct __false_type {
00059 };
00060
00061 template <class _Tp>
00062 struct __type_traits {
00063 typedef __true_type this_dummy_member_must_be_first;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 typedef __false_type has_trivial_default_constructor;
00082 typedef __false_type has_trivial_copy_constructor;
00083 typedef __false_type has_trivial_assignment_operator;
00084 typedef __false_type has_trivial_destructor;
00085 typedef __false_type is_POD_type;
00086 };
00087
00088
00089
00090
00091
00092
00093
00094 #ifndef __STL_NO_BOOL
00095
00096 __STL_TEMPLATE_NULL struct __type_traits<bool> {
00097 typedef __true_type has_trivial_default_constructor;
00098 typedef __true_type has_trivial_copy_constructor;
00099 typedef __true_type has_trivial_assignment_operator;
00100 typedef __true_type has_trivial_destructor;
00101 typedef __true_type is_POD_type;
00102 };
00103
00104 #endif
00105
00106 __STL_TEMPLATE_NULL struct __type_traits<char> {
00107 typedef __true_type has_trivial_default_constructor;
00108 typedef __true_type has_trivial_copy_constructor;
00109 typedef __true_type has_trivial_assignment_operator;
00110 typedef __true_type has_trivial_destructor;
00111 typedef __true_type is_POD_type;
00112 };
00113
00114 __STL_TEMPLATE_NULL struct __type_traits<signed char> {
00115 typedef __true_type has_trivial_default_constructor;
00116 typedef __true_type has_trivial_copy_constructor;
00117 typedef __true_type has_trivial_assignment_operator;
00118 typedef __true_type has_trivial_destructor;
00119 typedef __true_type is_POD_type;
00120 };
00121
00122 __STL_TEMPLATE_NULL struct __type_traits<unsigned char> {
00123 typedef __true_type has_trivial_default_constructor;
00124 typedef __true_type has_trivial_copy_constructor;
00125 typedef __true_type has_trivial_assignment_operator;
00126 typedef __true_type has_trivial_destructor;
00127 typedef __true_type is_POD_type;
00128 };
00129
00130 #ifdef __STL_HAS_WCHAR_T
00131
00132 __STL_TEMPLATE_NULL struct __type_traits<wchar_t> {
00133 typedef __true_type has_trivial_default_constructor;
00134 typedef __true_type has_trivial_copy_constructor;
00135 typedef __true_type has_trivial_assignment_operator;
00136 typedef __true_type has_trivial_destructor;
00137 typedef __true_type is_POD_type;
00138 };
00139
00140 #endif
00141
00142 __STL_TEMPLATE_NULL struct __type_traits<short> {
00143 typedef __true_type has_trivial_default_constructor;
00144 typedef __true_type has_trivial_copy_constructor;
00145 typedef __true_type has_trivial_assignment_operator;
00146 typedef __true_type has_trivial_destructor;
00147 typedef __true_type is_POD_type;
00148 };
00149
00150 __STL_TEMPLATE_NULL struct __type_traits<unsigned short> {
00151 typedef __true_type has_trivial_default_constructor;
00152 typedef __true_type has_trivial_copy_constructor;
00153 typedef __true_type has_trivial_assignment_operator;
00154 typedef __true_type has_trivial_destructor;
00155 typedef __true_type is_POD_type;
00156 };
00157
00158 __STL_TEMPLATE_NULL struct __type_traits<int> {
00159 typedef __true_type has_trivial_default_constructor;
00160 typedef __true_type has_trivial_copy_constructor;
00161 typedef __true_type has_trivial_assignment_operator;
00162 typedef __true_type has_trivial_destructor;
00163 typedef __true_type is_POD_type;
00164 };
00165
00166 __STL_TEMPLATE_NULL struct __type_traits<unsigned int> {
00167 typedef __true_type has_trivial_default_constructor;
00168 typedef __true_type has_trivial_copy_constructor;
00169 typedef __true_type has_trivial_assignment_operator;
00170 typedef __true_type has_trivial_destructor;
00171 typedef __true_type is_POD_type;
00172 };
00173
00174 __STL_TEMPLATE_NULL struct __type_traits<long> {
00175 typedef __true_type has_trivial_default_constructor;
00176 typedef __true_type has_trivial_copy_constructor;
00177 typedef __true_type has_trivial_assignment_operator;
00178 typedef __true_type has_trivial_destructor;
00179 typedef __true_type is_POD_type;
00180 };
00181
00182 __STL_TEMPLATE_NULL struct __type_traits<unsigned long> {
00183 typedef __true_type has_trivial_default_constructor;
00184 typedef __true_type has_trivial_copy_constructor;
00185 typedef __true_type has_trivial_assignment_operator;
00186 typedef __true_type has_trivial_destructor;
00187 typedef __true_type is_POD_type;
00188 };
00189
00190 #ifdef __STL_LONG_LONG
00191
00192 __STL_TEMPLATE_NULL struct __type_traits<long long> {
00193 typedef __true_type has_trivial_default_constructor;
00194 typedef __true_type has_trivial_copy_constructor;
00195 typedef __true_type has_trivial_assignment_operator;
00196 typedef __true_type has_trivial_destructor;
00197 typedef __true_type is_POD_type;
00198 };
00199
00200 __STL_TEMPLATE_NULL struct __type_traits<unsigned long long> {
00201 typedef __true_type has_trivial_default_constructor;
00202 typedef __true_type has_trivial_copy_constructor;
00203 typedef __true_type has_trivial_assignment_operator;
00204 typedef __true_type has_trivial_destructor;
00205 typedef __true_type is_POD_type;
00206 };
00207
00208 #endif
00209
00210 __STL_TEMPLATE_NULL struct __type_traits<float> {
00211 typedef __true_type has_trivial_default_constructor;
00212 typedef __true_type has_trivial_copy_constructor;
00213 typedef __true_type has_trivial_assignment_operator;
00214 typedef __true_type has_trivial_destructor;
00215 typedef __true_type is_POD_type;
00216 };
00217
00218 __STL_TEMPLATE_NULL struct __type_traits<double> {
00219 typedef __true_type has_trivial_default_constructor;
00220 typedef __true_type has_trivial_copy_constructor;
00221 typedef __true_type has_trivial_assignment_operator;
00222 typedef __true_type has_trivial_destructor;
00223 typedef __true_type is_POD_type;
00224 };
00225
00226 __STL_TEMPLATE_NULL struct __type_traits<long double> {
00227 typedef __true_type has_trivial_default_constructor;
00228 typedef __true_type has_trivial_copy_constructor;
00229 typedef __true_type has_trivial_assignment_operator;
00230 typedef __true_type has_trivial_destructor;
00231 typedef __true_type is_POD_type;
00232 };
00233
00234 #ifdef __STL_CLASS_PARTIAL_SPECIALIZATION
00235
00236 template <class _Tp>
00237 struct __type_traits<_Tp*> {
00238 typedef __true_type has_trivial_default_constructor;
00239 typedef __true_type has_trivial_copy_constructor;
00240 typedef __true_type has_trivial_assignment_operator;
00241 typedef __true_type has_trivial_destructor;
00242 typedef __true_type is_POD_type;
00243 };
00244
00245 #else
00246
00247 __STL_TEMPLATE_NULL struct __type_traits<char*> {
00248 typedef __true_type has_trivial_default_constructor;
00249 typedef __true_type has_trivial_copy_constructor;
00250 typedef __true_type has_trivial_assignment_operator;
00251 typedef __true_type has_trivial_destructor;
00252 typedef __true_type is_POD_type;
00253 };
00254
00255 __STL_TEMPLATE_NULL struct __type_traits<signed char*> {
00256 typedef __true_type has_trivial_default_constructor;
00257 typedef __true_type has_trivial_copy_constructor;
00258 typedef __true_type has_trivial_assignment_operator;
00259 typedef __true_type has_trivial_destructor;
00260 typedef __true_type is_POD_type;
00261 };
00262
00263 __STL_TEMPLATE_NULL struct __type_traits<unsigned char*> {
00264 typedef __true_type has_trivial_default_constructor;
00265 typedef __true_type has_trivial_copy_constructor;
00266 typedef __true_type has_trivial_assignment_operator;
00267 typedef __true_type has_trivial_destructor;
00268 typedef __true_type is_POD_type;
00269 };
00270
00271 __STL_TEMPLATE_NULL struct __type_traits<const char*> {
00272 typedef __true_type has_trivial_default_constructor;
00273 typedef __true_type has_trivial_copy_constructor;
00274 typedef __true_type has_trivial_assignment_operator;
00275 typedef __true_type has_trivial_destructor;
00276 typedef __true_type is_POD_type;
00277 };
00278
00279 __STL_TEMPLATE_NULL struct __type_traits<const signed char*> {
00280 typedef __true_type has_trivial_default_constructor;
00281 typedef __true_type has_trivial_copy_constructor;
00282 typedef __true_type has_trivial_assignment_operator;
00283 typedef __true_type has_trivial_destructor;
00284 typedef __true_type is_POD_type;
00285 };
00286
00287 __STL_TEMPLATE_NULL struct __type_traits<const unsigned char*> {
00288 typedef __true_type has_trivial_default_constructor;
00289 typedef __true_type has_trivial_copy_constructor;
00290 typedef __true_type has_trivial_assignment_operator;
00291 typedef __true_type has_trivial_destructor;
00292 typedef __true_type is_POD_type;
00293 };
00294
00295 #endif
00296
00297
00298
00299
00300
00301 template <class _Tp> struct _Is_integer {
00302 typedef __false_type _Integral;
00303 };
00304
00305 #ifndef __STL_NO_BOOL
00306
00307 __STL_TEMPLATE_NULL struct _Is_integer<bool> {
00308 typedef __true_type _Integral;
00309 };
00310
00311 #endif
00312
00313 __STL_TEMPLATE_NULL struct _Is_integer<char> {
00314 typedef __true_type _Integral;
00315 };
00316
00317 __STL_TEMPLATE_NULL struct _Is_integer<signed char> {
00318 typedef __true_type _Integral;
00319 };
00320
00321 __STL_TEMPLATE_NULL struct _Is_integer<unsigned char> {
00322 typedef __true_type _Integral;
00323 };
00324
00325 #ifdef __STL_HAS_WCHAR_T
00326
00327 __STL_TEMPLATE_NULL struct _Is_integer<wchar_t> {
00328 typedef __true_type _Integral;
00329 };
00330
00331 #endif
00332
00333 __STL_TEMPLATE_NULL struct _Is_integer<short> {
00334 typedef __true_type _Integral;
00335 };
00336
00337 __STL_TEMPLATE_NULL struct _Is_integer<unsigned short> {
00338 typedef __true_type _Integral;
00339 };
00340
00341 __STL_TEMPLATE_NULL struct _Is_integer<int> {
00342 typedef __true_type _Integral;
00343 };
00344
00345 __STL_TEMPLATE_NULL struct _Is_integer<unsigned int> {
00346 typedef __true_type _Integral;
00347 };
00348
00349 __STL_TEMPLATE_NULL struct _Is_integer<long> {
00350 typedef __true_type _Integral;
00351 };
00352
00353 __STL_TEMPLATE_NULL struct _Is_integer<unsigned long> {
00354 typedef __true_type _Integral;
00355 };
00356
00357 #ifdef __STL_LONG_LONG
00358
00359 __STL_TEMPLATE_NULL struct _Is_integer<long long> {
00360 typedef __true_type _Integral;
00361 };
00362
00363 __STL_TEMPLATE_NULL struct _Is_integer<unsigned long long> {
00364 typedef __true_type _Integral;
00365 };
00366
00367 #endif
00368
00369 #endif
00370
00371
00372
00373