File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 44
55// / Used for std::string conformance to Swift.Hashable
66typedef std::hash<std::string> __swift_interopHashOfString;
7+ inline std::size_t __swift_interopComputeHashOfString (std::string str) {
8+ return __swift_interopHashOfString ()(str);
9+ }
710
811// / Used for std::u16string conformance to Swift.Hashable
912typedef std::hash<std::u16string> __swift_interopHashOfU16String;
13+ inline std::size_t __swift_interopComputeHashOfU16String (std::u16string str) {
14+ return __swift_interopHashOfU16String ()(str);
15+ }
1016
1117// / Used for std::u32string conformance to Swift.Hashable
1218typedef std::hash<std::u32string> __swift_interopHashOfU32String;
19+ inline std::size_t __swift_interopComputeHashOfU32String (std::u32string str) {
20+ return __swift_interopHashOfU32String ()(str);
21+ }
1322
1423inline std::chrono::seconds __swift_interopMakeChronoSeconds (int64_t seconds) {
1524 return std::chrono::seconds (seconds);
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ extension std.string: Hashable {
198198 @_alwaysEmitIntoClient
199199 public func hash( into hasher: inout Hasher ) {
200200 // Call std::hash<std::string>::operator()
201- let cxxHash = __swift_interopHashOfString ( ) . callAsFunction ( self )
201+ let cxxHash = __swift_interopComputeHashOfString ( self )
202202 hasher. combine ( cxxHash)
203203 }
204204}
@@ -207,7 +207,7 @@ extension std.u16string: Hashable {
207207 @_alwaysEmitIntoClient
208208 public func hash( into hasher: inout Hasher ) {
209209 // Call std::hash<std::u16string>::operator()
210- let cxxHash = __swift_interopHashOfU16String ( ) . callAsFunction ( self )
210+ let cxxHash = __swift_interopComputeHashOfU16String ( self )
211211 hasher. combine ( cxxHash)
212212 }
213213}
@@ -216,7 +216,7 @@ extension std.u32string: Hashable {
216216 @_alwaysEmitIntoClient
217217 public func hash( into hasher: inout Hasher ) {
218218 // Call std::hash<std::u32string>::operator()
219- let cxxHash = __swift_interopHashOfU32String ( ) . callAsFunction ( self )
219+ let cxxHash = __swift_interopComputeHashOfU32String ( self )
220220 hasher. combine ( cxxHash)
221221 }
222222}
You can’t perform that action at this time.
0 commit comments