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 template<>
00199 struct __is_integer<long long>
00200 {
00201 enum
00202 {
00203 _M_type = 1
00204 };
00205 };
00206
00207 template<>
00208 struct __is_integer<unsigned long long>
00209 {
00210 enum
00211 {
00212 _M_type = 1
00213 };
00214 };
00215
00216
00217
00218
00219 template<typename _Tp>
00220 struct __is_floating
00221 {
00222 enum
00223 {
00224 _M_type = 0
00225 };
00226 };
00227
00228
00229 template<>
00230 struct __is_floating<float>
00231 {
00232 enum
00233 {
00234 _M_type = 1
00235 };
00236 };
00237
00238 template<>
00239 struct __is_floating<double>
00240 {
00241 enum
00242 {
00243 _M_type = 1
00244 };
00245 };
00246
00247 template<>
00248 struct __is_floating<long double>
00249 {
00250 enum
00251 {
00252 _M_type = 1
00253 };
00254 };
00255
00256
00257
00258
00259 template<typename _Tp>
00260 struct __is_arithmetic
00261 {
00262 enum
00263 {
00264 _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type
00265 };
00266 };
00267
00268
00269
00270
00271 template<typename _Tp>
00272 struct __is_fundamental
00273 {
00274 enum
00275 {
00276 _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type
00277 };
00278 };
00279
00280
00281
00282
00283 template<typename _Tp>
00284 struct __is_pod
00285 {
00286 enum
00287 {
00288 _M_type = __is_fundamental<_Tp>::_M_type
00289 };
00290 };
00291
00292 }
00293
00294
00295 #endif //_CPP_BITS_CPP_TYPE_TRAITS_H