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