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 _CPP_BITS_TYPE_TRAITS_H
00050 #define _CPP_BITS_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 typedef __true_type this_dummy_member_must_be_first;
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 typedef __false_type has_trivial_default_constructor;
00114 typedef __false_type has_trivial_copy_constructor;
00115 typedef __false_type has_trivial_assignment_operator;
00116 typedef __false_type has_trivial_destructor;
00117 typedef __false_type is_POD_type;
00118 };
00119
00120
00121
00122
00123 template<> struct __type_traits<bool> {
00124 typedef __true_type has_trivial_default_constructor;
00125 typedef __true_type has_trivial_copy_constructor;
00126 typedef __true_type has_trivial_assignment_operator;
00127 typedef __true_type has_trivial_destructor;
00128 typedef __true_type is_POD_type;
00129 };
00130
00131 template<> struct __type_traits<char> {
00132 typedef __true_type has_trivial_default_constructor;
00133 typedef __true_type has_trivial_copy_constructor;
00134 typedef __true_type has_trivial_assignment_operator;
00135 typedef __true_type has_trivial_destructor;
00136 typedef __true_type is_POD_type;
00137 };
00138
00139 template<> struct __type_traits<signed char> {
00140 typedef __true_type has_trivial_default_constructor;
00141 typedef __true_type has_trivial_copy_constructor;
00142 typedef __true_type has_trivial_assignment_operator;
00143 typedef __true_type has_trivial_destructor;
00144 typedef __true_type is_POD_type;
00145 };
00146
00147 template<> struct __type_traits<unsigned char> {
00148 typedef __true_type has_trivial_default_constructor;
00149 typedef __true_type has_trivial_copy_constructor;
00150 typedef __true_type has_trivial_assignment_operator;
00151 typedef __true_type has_trivial_destructor;
00152 typedef __true_type is_POD_type;
00153 };
00154
00155 template<> struct __type_traits<wchar_t> {
00156 typedef __true_type has_trivial_default_constructor;
00157 typedef __true_type has_trivial_copy_constructor;
00158 typedef __true_type has_trivial_assignment_operator;
00159 typedef __true_type has_trivial_destructor;
00160 typedef __true_type is_POD_type;
00161 };
00162
00163 template<> struct __type_traits<short> {
00164 typedef __true_type has_trivial_default_constructor;
00165 typedef __true_type has_trivial_copy_constructor;
00166 typedef __true_type has_trivial_assignment_operator;
00167 typedef __true_type has_trivial_destructor;
00168 typedef __true_type is_POD_type;
00169 };
00170
00171 template<> struct __type_traits<unsigned short> {
00172 typedef __true_type has_trivial_default_constructor;
00173 typedef __true_type has_trivial_copy_constructor;
00174 typedef __true_type has_trivial_assignment_operator;
00175 typedef __true_type has_trivial_destructor;
00176 typedef __true_type is_POD_type;
00177 };
00178
00179 template<> struct __type_traits<int> {
00180 typedef __true_type has_trivial_default_constructor;
00181 typedef __true_type has_trivial_copy_constructor;
00182 typedef __true_type has_trivial_assignment_operator;
00183 typedef __true_type has_trivial_destructor;
00184 typedef __true_type is_POD_type;
00185 };
00186
00187 template<> struct __type_traits<unsigned int> {
00188 typedef __true_type has_trivial_default_constructor;
00189 typedef __true_type has_trivial_copy_constructor;
00190 typedef __true_type has_trivial_assignment_operator;
00191 typedef __true_type has_trivial_destructor;
00192 typedef __true_type is_POD_type;
00193 };
00194
00195 template<> struct __type_traits<long> {
00196 typedef __true_type has_trivial_default_constructor;
00197 typedef __true_type has_trivial_copy_constructor;
00198 typedef __true_type has_trivial_assignment_operator;
00199 typedef __true_type has_trivial_destructor;
00200 typedef __true_type is_POD_type;
00201 };
00202
00203 template<> struct __type_traits<unsigned long> {
00204 typedef __true_type has_trivial_default_constructor;
00205 typedef __true_type has_trivial_copy_constructor;
00206 typedef __true_type has_trivial_assignment_operator;
00207 typedef __true_type has_trivial_destructor;
00208 typedef __true_type is_POD_type;
00209 };
00210
00211 template<> struct __type_traits<long long> {
00212 typedef __true_type has_trivial_default_constructor;
00213 typedef __true_type has_trivial_copy_constructor;
00214 typedef __true_type has_trivial_assignment_operator;
00215 typedef __true_type has_trivial_destructor;
00216 typedef __true_type is_POD_type;
00217 };
00218
00219 template<> struct __type_traits<unsigned long long> {
00220 typedef __true_type has_trivial_default_constructor;
00221 typedef __true_type has_trivial_copy_constructor;
00222 typedef __true_type has_trivial_assignment_operator;
00223 typedef __true_type has_trivial_destructor;
00224 typedef __true_type is_POD_type;
00225 };
00226
00227 template<> struct __type_traits<float> {
00228 typedef __true_type has_trivial_default_constructor;
00229 typedef __true_type has_trivial_copy_constructor;
00230 typedef __true_type has_trivial_assignment_operator;
00231 typedef __true_type has_trivial_destructor;
00232 typedef __true_type is_POD_type;
00233 };
00234
00235 template<> struct __type_traits<double> {
00236 typedef __true_type has_trivial_default_constructor;
00237 typedef __true_type has_trivial_copy_constructor;
00238 typedef __true_type has_trivial_assignment_operator;
00239 typedef __true_type has_trivial_destructor;
00240 typedef __true_type is_POD_type;
00241 };
00242
00243 template<> struct __type_traits<long double> {
00244 typedef __true_type has_trivial_default_constructor;
00245 typedef __true_type has_trivial_copy_constructor;
00246 typedef __true_type has_trivial_assignment_operator;
00247 typedef __true_type has_trivial_destructor;
00248 typedef __true_type is_POD_type;
00249 };
00250
00251 template <class _Tp>
00252 struct __type_traits<_Tp*> {
00253 typedef __true_type has_trivial_default_constructor;
00254 typedef __true_type has_trivial_copy_constructor;
00255 typedef __true_type has_trivial_assignment_operator;
00256 typedef __true_type has_trivial_destructor;
00257 typedef __true_type is_POD_type;
00258 };
00259
00260
00261
00262
00263
00264 template <class _Tp> struct _Is_integer {
00265 typedef __false_type _Integral;
00266 };
00267
00268 template<> struct _Is_integer<bool> {
00269 typedef __true_type _Integral;
00270 };
00271
00272 template<> struct _Is_integer<char> {
00273 typedef __true_type _Integral;
00274 };
00275
00276 template<> struct _Is_integer<signed char> {
00277 typedef __true_type _Integral;
00278 };
00279
00280 template<> struct _Is_integer<unsigned char> {
00281 typedef __true_type _Integral;
00282 };
00283
00284 template<> struct _Is_integer<wchar_t> {
00285 typedef __true_type _Integral;
00286 };
00287
00288 template<> struct _Is_integer<short> {
00289 typedef __true_type _Integral;
00290 };
00291
00292 template<> struct _Is_integer<unsigned short> {
00293 typedef __true_type _Integral;
00294 };
00295
00296 template<> struct _Is_integer<int> {
00297 typedef __true_type _Integral;
00298 };
00299
00300 template<> struct _Is_integer<unsigned int> {
00301 typedef __true_type _Integral;
00302 };
00303
00304 template<> struct _Is_integer<long> {
00305 typedef __true_type _Integral;
00306 };
00307
00308 template<> struct _Is_integer<unsigned long> {
00309 typedef __true_type _Integral;
00310 };
00311
00312 template<> struct _Is_integer<long long> {
00313 typedef __true_type _Integral;
00314 };
00315
00316 template<> struct _Is_integer<unsigned long long> {
00317 typedef __true_type _Integral;
00318 };
00319
00320 template<typename _Tp> struct _Is_normal_iterator {
00321 typedef __false_type _Normal;
00322 };
00323
00324
00325 namespace __gnu_cxx
00326 {
00327 template<typename _Iterator, typename _Container> class __normal_iterator;
00328 }
00329
00330 template<typename _Iterator, typename _Container>
00331 struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > {
00332 typedef __true_type _Normal;
00333 };
00334
00335 #endif
00336
00337
00338
00339