@@ -63,12 +63,12 @@ Assumptions:
63
63
+ [ Function templates] ( #function-templates )
64
64
+ [ Function templates: import as Swift generic functions] ( #function-templates-import-as-swift-generic-functions )
65
65
+ [ Function templates: allow to specify template arguments] ( #function-templates-allow-to-specify-template-arguments )
66
- + [ Function templates: calls to specific specilalizations ] ( #function-templates-calls-to-specific-specilalizations )
66
+ + [ Function templates: calls to specific specializations ] ( #function-templates-calls-to-specific-specializations )
67
67
+ [ Function templates: calls with generic type parameters] ( #function-templates-calls-with-generic-type-parameters )
68
68
+ [ Function templates: importing as real generic functions] ( #function-templates-importing-as-real-generic-functions )
69
69
+ [ Class templates] ( #class-templates )
70
70
+ [ Class templates: importing instantiation behind typedef] ( #class-templates-importing-instantiation-behind-typedef )
71
- + [ Class templates: importing specific specilalizations ] ( #class-templates-importing-specific-specilalizations )
71
+ + [ Class templates: importing specific specializations ] ( #class-templates-importing-specific-specializations )
72
72
+ [ Class templates: using with generic type parameters] ( #class-templates-using-with-generic-type-parameters )
73
73
+ [ Class templates: using in generic code through a synthesized protocol] ( #class-templates-using-in-generic-code-through-a-synthesized-protocol )
74
74
+ [ Class templates: importing as real generic structs] ( #class-templates-importing-as-real-generic-structs )
@@ -1902,7 +1902,7 @@ struct Employee {
1902
1902
private func _getName() -> UnsafePointer<std.string>
1903
1903
1904
1904
// void setName(std::string newName);
1905
- private func _setName(_ newName: std.string)
1905
+ private mutating func _setName(_ newName: std.string)
1906
1906
1907
1907
// Swifty API.
1908
1908
public var name: std.string {
@@ -2436,7 +2436,7 @@ possible to do so when importing a C++ function template as a C++ generic
2436
2436
function; "inout"-ness of an argument can't change across instantiations of a
2437
2437
generic function in Swift.
2438
2438
2439
- ### Function templates: calls to specific specilalizations
2439
+ ### Function templates: calls to specific specializations
2440
2440
2441
2441
From an implementation point of view, it is easy to compile Swift code that
2442
2442
calls C++ function templates if template arguments are concrete types that are
@@ -2615,7 +2615,7 @@ struct MagicNumber {}
2615
2615
typealias WrappedMagicNumber = __CxxTemplateInst12MagicWrapperI11MagicNumberE
2616
2616
```
2617
2617
2618
- ### Class templates: importing specific specilalizations
2618
+ ### Class templates: importing specific specializations
2619
2619
2620
2620
Just like with calls to C++ function templates, it is easy to compile a use of a
2621
2621
C++ class templates if the usage in Swift code unambiguously specifies which
0 commit comments