OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef String16STL_h | 5 #ifndef String16STL_h |
6 #define String16STL_h | 6 #define String16STL_h |
7 | 7 |
8 #include <cstdlib> | 8 #include <cstdlib> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // compile! | 236 // compile! |
237 // TODO(eostroukhov): Eradicate | 237 // TODO(eostroukhov): Eradicate |
238 class String { | 238 class String { |
239 public: | 239 public: |
240 String() {}; | 240 String() {}; |
241 String(const String16& other) {}; | 241 String(const String16& other) {}; |
242 operator String16() const { return String16(); }; | 242 operator String16() const { return String16(); }; |
243 }; | 243 }; |
244 } // namespace WTF | 244 } // namespace WTF |
245 | 245 |
| 246 #if !defined(__APPLE__) || defined(_LIBCPP_VERSION) |
246 | 247 |
247 namespace std { | 248 namespace std { |
248 template<> struct hash<String16> { | 249 template<> struct hash<String16> { |
249 std::size_t operator()(const String16& string) const | 250 std::size_t operator()(const String16& string) const |
250 { | 251 { |
251 return string.hash(); | 252 return string.hash(); |
252 } | 253 } |
253 }; | 254 }; |
254 | 255 |
255 } // namespace std | 256 } // namespace std |
256 | 257 |
| 258 #endif // !defined(__APPLE__) || defined(_LIBCPP_VERSION) |
| 259 |
257 using String = WTF::String; | 260 using String = WTF::String; |
258 | 261 |
259 #endif // !defined(String16STL_h) | 262 #endif // !defined(String16STL_h) |
OLD | NEW |