00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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 #ifndef _TYPE_TRAITS_H
00050 #define _TYPE_TRAITS_H 1
00051
00052 #pragma GCC system_header
00053
00054 #include <bits/c++config.h>
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 struct __true_type {};
00091 struct __false_type {};
00092
00093 template <class _Tp>
00094 struct __type_traits
00095 {
00096 typedef __true_type this_dummy_member_must_be_first;
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 typedef __false_type has_trivial_default_constructor;
00115 typedef __false_type has_trivial_copy_constructor;
00116 typedef __false_type has_trivial_assignment_operator;
00117 typedef __false_type has_trivial_destructor;
00118 typedef __false_type is_POD_type;
00119 };
00120
00121
00122
00123
00124 template<>
00125 struct __type_traits<bool>
00126 {
00127 typedef __true_type has_trivial_default_constructor;
00128 typedef __true_type has_trivial_copy_constructor;
00129 typedef __true_type has_trivial_assignment_operator;
00130 typedef __true_type has_trivial_destructor;
00131 typedef __true_type is_POD_type;
00132 };
00133
00134 template<>
00135 struct __type_traits<char>
00136 {
00137 typedef __true_type has_trivial_default_constructor;
00138 typedef __true_type has_trivial_copy_constructor;
00139 typedef __true_type has_trivial_assignment_operator;
00140 typedef __true_type has_trivial_destructor;
00141 typedef __true_type is_POD_type;
00142 };
00143
00144 template<>
00145 struct __type_traits<signed char>
00146 {
00147 typedef __true_type has_trivial_default_constructor;
00148 typedef __true_type has_trivial_copy_constructor;
00149 typedef __true_type has_trivial_assignment_operator;
00150 typedef __true_type has_trivial_destructor;
00151 typedef __true_type is_POD_type;
00152 };
00153
00154 template<>
00155 struct __type_traits<unsigned char>
00156 {
00157 typedef __true_type has_trivial_default_constructor;
00158 typedef __true_type has_trivial_copy_constructor;
00159 typedef __true_type has_trivial_assignment_operator;
00160 typedef __true_type has_trivial_destructor;
00161 typedef __true_type is_POD_type;
00162 };
00163
00164 template<>
00165 struct __type_traits<wchar_t>
00166 {
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 template<>
00175 struct __type_traits<short>
00176 {
00177 typedef __true_type has_trivial_default_constructor;
00178 typedef __true_type has_trivial_copy_constructor;
00179 typedef __true_type has_trivial_assignment_operator;
00180 typedef __true_type has_trivial_destructor;
00181 typedef __true_type is_POD_type;
00182 };
00183
00184 template<>
00185 struct __type_traits<unsigned short>
00186 {
00187 typedef __true_type has_trivial_default_constructor;
00188 typedef __true_type has_trivial_copy_constructor;
00189 typedef __true_type has_trivial_assignment_operator;
00190 typedef __true_type has_trivial_destructor;
00191 typedef __true_type is_POD_type;
00192 };
00193
00194 template<>
00195 struct __type_traits<int>
00196 {
00197 typedef __true_type has_trivial_default_constructor;
00198 typedef __true_type has_trivial_copy_constructor;
00199 typedef __true_type has_trivial_assignment_operator;
00200 typedef __true_type has_trivial_destructor;
00201 typedef __true_type is_POD_type;
00202 };
00203
00204 template<>
00205 struct __type_traits<unsigned int>
00206 {
00207 typedef __true_type has_trivial_default_constructor;
00208 typedef __true_type has_trivial_copy_constructor;
00209 typedef __true_type has_trivial_assignment_operator;
00210 typedef __true_type has_trivial_destructor;
00211 typedef __true_type is_POD_type;
00212 };
00213
00214 template<>
00215 struct __type_traits<long>
00216 {
00217 typedef __true_type has_trivial_default_constructor;
00218 typedef __true_type has_trivial_copy_constructor;
00219 typedef __true_type has_trivial_assignment_operator;
00220 typedef __true_type has_trivial_destructor;
00221 typedef __true_type is_POD_type;
00222 };
00223
00224 template<>
00225 struct __type_traits<unsigned long>
00226 {
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 template<>
00235 struct __type_traits<long long>
00236 {
00237 typedef __true_type has_trivial_default_constructor;
00238 typedef __true_type has_trivial_copy_constructor;
00239 typedef __true_type has_trivial_assignment_operator;
00240 typedef __true_type has_trivial_destructor;
00241 typedef __true_type is_POD_type;
00242 };
00243
00244 template<>
00245 struct __type_traits<unsigned long long>
00246 {
00247 typedef __true_type has_trivial_default_constructor;
00248 typedef __true_type has_trivial_copy_constructor;
00249 typedef __true_type has_trivial_assignment_operator;
00250 typedef __true_type has_trivial_destructor;
00251 typedef __true_type is_POD_type;
00252 };
00253
00254 template<>
00255 struct __type_traits<float>
00256 {
00257 typedef __true_type has_trivial_default_constructor;
00258 typedef __true_type has_trivial_copy_constructor;
00259 typedef __true_type has_trivial_assignment_operator;
00260 typedef __true_type has_trivial_destructor;
00261 typedef __true_type is_POD_type;
00262 };
00263
00264 template<>
00265 struct __type_traits<double>
00266 {
00267 typedef __true_type has_trivial_default_constructor;
00268 typedef __true_type has_trivial_copy_constructor;
00269 typedef __true_type has_trivial_assignment_operator;
00270 typedef __true_type has_trivial_destructor;
00271 typedef __true_type is_POD_type;
00272 };
00273
00274 template<>
00275 struct __type_traits<long double>
00276 {
00277 typedef __true_type has_trivial_default_constructor;
00278 typedef __true_type has_trivial_copy_constructor;
00279 typedef __true_type has_trivial_assignment_operator;
00280 typedef __true_type has_trivial_destructor;
00281 typedef __true_type is_POD_type;
00282 };
00283
00284 template <class _Tp>
00285 struct __type_traits<_Tp*>
00286 {
00287 typedef __true_type has_trivial_default_constructor;
00288 typedef __true_type has_trivial_copy_constructor;
00289 typedef __true_type has_trivial_assignment_operator;
00290 typedef __true_type has_trivial_destructor;
00291 typedef __true_type is_POD_type;
00292 };
00293
00294
00295
00296
00297 template <class _Tp>
00298 struct _Is_integer
00299 {
00300 typedef __false_type _Integral;
00301 };
00302
00303 template<>
00304 struct _Is_integer<bool>
00305 {
00306 typedef __true_type _Integral;
00307 };
00308
00309 template<>
00310 struct _Is_integer<char>
00311 {
00312 typedef __true_type _Integral;
00313 };
00314
00315 template<>
00316 struct _Is_integer<signed char>
00317 {
00318 typedef __true_type _Integral;
00319 };
00320
00321 template<>
00322 struct _Is_integer<unsigned char>
00323 {
00324 typedef __true_type _Integral;
00325 };
00326
00327 template<>
00328 struct _Is_integer<wchar_t>
00329 {
00330 typedef __true_type _Integral;
00331 };
00332
00333 template<>
00334 struct _Is_integer<short>
00335 {
00336 typedef __true_type _Integral;
00337 };
00338
00339 template<>
00340 struct _Is_integer<unsigned short>
00341 {
00342 typedef __true_type _Integral;
00343 };
00344
00345 template<>
00346 struct _Is_integer<int>
00347 {
00348 typedef __true_type _Integral;
00349 };
00350
00351 template<>
00352 struct _Is_integer<unsigned int>
00353 {
00354 typedef __true_type _Integral;
00355 };
00356
00357 template<>
00358 struct _Is_integer<long>
00359 {
00360 typedef __true_type _Integral;
00361 };
00362
00363 template<>
00364 struct _Is_integer<unsigned long>
00365 {
00366 typedef __true_type _Integral;
00367 };
00368
00369 template<>
00370 struct _Is_integer<long long>
00371 {
00372 typedef __true_type _Integral;
00373 };
00374
00375 template<>
00376 struct _Is_integer<unsigned long long>
00377 {
00378 typedef __true_type _Integral;
00379 };
00380
00381 template<typename _Tp>
00382 struct _Is_normal_iterator
00383 {
00384 typedef __false_type _Normal;
00385 };
00386
00387
00388 namespace __gnu_cxx
00389 {
00390 template<typename _Iterator, typename _Container>
00391 class __normal_iterator;
00392 }
00393
00394 template<typename _Iterator, typename _Container>
00395 struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
00396 _Container> >
00397 {
00398 typedef __true_type _Normal;
00399 };
00400
00401 #endif
00402
00403
00404
00405