Changeset 8ac215d in mainline
- Timestamp:
- 2018-07-05T21:41:17Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fb070d
- Parents:
- 2084bfcd
- git-author:
- Jaroslav Jindrak <dzejrou@…> (2017-10-13 17:54:53)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:17)
- Location:
- uspace/lib/cpp/include
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/type_traits.hpp
r2084bfcd r8ac215d 31 31 32 32 #include <cstdlib> 33 #include <cstddef> 33 34 34 35 namespace std … … 55 56 return value; 56 57 } 57 } 58 }; 58 59 59 60 using true_type = integral_constant<bool, true>; … … 70 71 using remove_cv_t = typename remove_cv<T>::type; 71 72 72 template<class T> 73 struct is_void: aux::is_void<remove_cv_t<T>>; 74 75 template<class T> 76 struct is_null_pointer: aux::is_null_pointer<remove_cv_t<T>>; 77 78 template<class T> 79 struct is_integral: aux::is_integral<remove_cv_t<T>>; 80 81 template<class T> 82 struct is_floating_point: aux::is_floating_point<remove_cv_t<T>>; 83 84 template<class> 85 struct is_array: false_type; 86 87 template<class T> 88 struct is_array<T[]>: true_type; 89 90 template<class T> 91 struct is_pointer: aux::is_pointer<remove_cv_t<T>>; 73 template<class> 74 struct __is_void: false_type 75 { /* DUMMY BODY */ }; 76 77 template<> 78 struct __is_void<void>: true_type 79 { /* DUMMY BODY */ }; 80 81 template<class T> 82 struct is_void: __is_void<remove_cv_t<T>> 83 { /* DUMMY BODY */ }; 84 85 template<class> 86 struct __is_null_pointer: false_type 87 { /* DUMMY BODY */ }; 88 89 template<> 90 struct __is_null_pointer<nullptr_t>: true_type 91 { /* DUMMY BODY */ }; 92 93 template<class T> 94 struct is_null_pointer: __is_null_pointer<remove_cv_t<T>> 95 { /* DUMMY BODY */ }; 96 97 template<class T> 98 struct __is_integral: false_type 99 { /* DUMMY BODY */ }; 100 101 template<> 102 struct __is_integral<bool>: true_type 103 { /* DUMMY BODY */ }; 104 105 template<> 106 struct __is_integral<char>: true_type 107 { /* DUMMY BODY */ }; 108 109 template<> 110 struct __is_integral<signed char>: true_type 111 { /* DUMMY BODY */ }; 112 113 template<> 114 struct __is_integral<unsigned char>: true_type 115 { /* DUMMY BODY */ }; 116 117 /* TODO: Problem - wchar_t is typedef'd to int here. 118 template<> 119 struct __is_integral<wchar_t>; 120 */ 121 122 template<> 123 struct __is_integral<long>: true_type 124 { /* DUMMY BODY */ }; 125 126 template<> 127 struct __is_integral<unsigned long>: true_type 128 { /* DUMMY BODY */ }; 129 130 template<> 131 struct __is_integral<int>: true_type 132 { /* DUMMY BODY */ }; 133 134 template<> 135 struct __is_integral<unsigned int>: true_type 136 { /* DUMMY BODY */ }; 137 138 template<> 139 struct __is_integral<short>: true_type 140 { /* DUMMY BODY */ }; 141 142 template<> 143 struct __is_integral<unsigned short>: true_type 144 { /* DUMMY BODY */ }; 145 146 template<> 147 struct __is_integral<long long>: true_type 148 { /* DUMMY BODY */ }; 149 150 template<> 151 struct __is_integral<unsigned long long>: true_type 152 { /* DUMMY BODY */ }; 153 154 template<class T> 155 struct is_integral: __is_integral<remove_cv_t<T>> 156 { /* DUMMY BODY */ }; 157 158 template<class> 159 struct __is_floating_point: false_type 160 { /* DUMMY BODY */ }; 161 162 template<> 163 struct __is_floating_point<float>: true_type 164 { /* DUMMY BODY */ }; 165 166 template<> 167 struct __is_floating_point<double>: true_type 168 { /* DUMMY BODY */ }; 169 170 template<> 171 struct __is_floating_point<long double>: true_type 172 { /* DUMMY BODY */ }; 173 174 template<class T> 175 struct is_floating_point: __is_floating_point<remove_cv_t<T>> 176 { /* DUMMY BODY */ }; 177 178 template<class> 179 struct is_array: false_type 180 { /* DUMMY BODY */ }; 181 182 template<class T> 183 struct is_array<T[]>: true_type 184 { /* DUMMY BODY */ }; 185 186 template<class> 187 struct __is_pointer: false_type 188 { /* DUMMY BODY */ }; 189 190 template<class T> 191 struct __is_pointer<T*>: true_type 192 { /* DUMMY BODY */ }; 193 194 template<class T> 195 struct is_pointer: __is_pointer<remove_cv_t<T>> 196 { /* DUMMY BODY */ }; 92 197 93 198 template<class T> … … 276 381 277 382 template<class T, class U> 278 struct is_same: false_type; 279 280 template<class T> 281 struct is_same<T, T>: true_type; 383 struct is_same: false_type 384 { /* DUMMY BODY */ }; 385 386 template<class T> 387 struct is_same<T, T>: true_type 388 { /* DUMMY BODY */ }; 282 389 283 390 template<class Base, class Derived>
Note:
See TracChangeset
for help on using the changeset viewer.