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 #ifndef _CPP_BITS_CPP_TYPE_TRAITS_H
00038 #define _CPP_BITS_CPP_TYPE_TRAITS_H 1
00039
00040 #pragma GCC system_header
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 namespace std
00068 {
00069 template<typename _Tp>
00070 struct __is_void
00071 {
00072 enum
00073 {
00074 _M_type = 0
00075 };
00076 };
00077
00078 template<>
00079 struct __is_void<void>
00080 {
00081 enum
00082 {
00083 _M_type = 1
00084 };
00085 };
00086
00087
00088
00089
00090 template<typename _Tp>
00091 struct __is_integer
00092 {
00093 enum
00094 {
00095 _M_type = 0
00096 };
00097 };
00098
00099
00100
00101
00102 template<>
00103 struct __is_integer<bool>
00104 {
00105 enum
00106 {
00107 _M_type = 1
00108 };
00109 };
00110
00111 template<>
00112 struct __is_integer<char>
00113 {
00114 enum
00115 {
00116 _M_type = 1
00117 };
00118 };
00119
00120 template<>
00121 struct __is_integer<signed char>
00122 {
00123 enum
00124 {
00125 _M_type = 1
00126 };
00127 };
00128
00129 template<>
00130 struct __is_integer<unsigned char>
00131 {
00132 enum
00133 {
00134 _M_type = 1
00135 };
00136 };
00137
00138 # ifdef _GLIBCPP_USE_WCHAR_T
00139 template<>
00140 struct __is_integer<wchar_t>
00141 {
00142 enum
00143 {
00144 _M_type = 1
00145 };
00146 };
00147 # endif
00148
00149 template<>
00150 struct __is_integer<short>
00151 {
00152 enum
00153 {
00154 _M_type = 1
00155 };
00156 };
00157
00158 template<>
00159 struct __is_integer<unsigned short>
00160 {
00161 enum
00162 {
00163 _M_type = 1
00164 };
00165 };
00166
00167 template<>
00168 struct __is_integer<int>
00169 {
00170 enum
00171 {
00172 _M_type = 1
00173 };
00174 };
00175
00176 template<>
00177 struct __is_integer<unsigned int>
00178 {
00179 enum
00180 {
00181 _M_type = 1
00182 };
00183 };
00184
00185 template<>
00186 struct __is_integer<long>
00187 {
00188 enum
00189 {
00190 _M_type = 1
00191 };
00192 };
00193
00194 template<>
00195 struct __is_integer<unsigned long>
00196 {
00197 enum
00198 {
00199 _M_type = 1
00200 };
00201 };
00202
00203 template<>
00204 struct __is_integer<long long>
00205 {
00206 enum
00207 {
00208 _M_type = 1
00209 };
00210 };
00211
00212 template<>
00213 struct __is_integer<unsigned long long>
00214 {
00215 enum
00216 {
00217 _M_type = 1
00218 };
00219 };
00220
00221
00222
00223
00224 template<typename _Tp>
00225 struct __is_floating
00226 {
00227 enum
00228 {
00229 _M_type = 0
00230 };
00231 };
00232
00233
00234 template<>
00235 struct __is_floating<float>
00236 {
00237 enum
00238 {
00239 _M_type = 1
00240 };
00241 };
00242
00243 template<>
00244 struct __is_floating<double>
00245 {
00246 enum
00247 {
00248 _M_type = 1
00249 };
00250 };
00251
00252 template<>
00253 struct __is_floating<long double>
00254 {
00255 enum
00256 {
00257 _M_type = 1
00258 };
00259 };
00260
00261
00262
00263
00264 template<typename _Tp>
00265 struct __is_arithmetic
00266 {
00267 enum
00268 {
00269 _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type
00270 };
00271 };
00272
00273
00274
00275
00276 template<typename _Tp>
00277 struct __is_fundamental
00278 {
00279 enum
00280 {
00281 _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type
00282 };
00283 };
00284
00285
00286
00287
00288 template<typename _Tp>
00289 struct __is_pod
00290 {
00291 enum
00292 {
00293 _M_type = __is_fundamental<_Tp>::_M_type
00294 };
00295 };
00296
00297 }
00298
00299
00300 #endif //_CPP_BITS_CPP_TYPE_TRAITS_H