@@ -189,7 +189,7 @@ public struct Coordinate3 {
189
189
```
190
190
to ` BitwiseCopyable ` .
191
191
192
- ### Suppressing inferred conformance<a name =" suppression " / >
192
+ ### Suppressing inferred conformance<a name =" suppression " ></ a >
193
193
194
194
To suppress the inference of ` BitwiseCopyable ` , ` ~BitwiseCopyable ` can be added to the type's inheritance list.
195
195
@@ -199,7 +199,7 @@ struct Coordinate4 : ~BitwiseCopyable {...}
199
199
200
200
Suppression must be declared on the type declaration itself, not on an extension.
201
201
202
- ### Transient and permanent notions<a name =" transient-and-permanent " / >
202
+ ### Transient and permanent notions<a name =" transient-and-permanent " ></ a >
203
203
204
204
The Swift runtime already describes[ ^ 4 ] whether a type is bitwise-copyable.
205
205
It is surfaced, among other places, in the standard library function ` _isPOD ` [ ^ 5 ] .
@@ -223,7 +223,7 @@ In other words returning true from `_isPOD` is a transient property, and conform
223
223
For this reason, conformance to ` BitwiseCopyable ` is not inherent.
224
224
Its declaration on a public type provides a guarantee that the compiler cannot infer.
225
225
226
- ### Limitations of BitwiseCopyable<a name =" limitations " / >
226
+ ### Limitations of BitwiseCopyable<a name =" limitations " ></ a >
227
227
228
228
Being declared with ` @_marker ` , ` BitwiseCopyable ` is a limited protocol.
229
229
Its limited nature allows the protocol's runtime behavior to be defined later, as needed.
@@ -341,7 +341,7 @@ For example, casting a type which suppressed a conformance to `BitwiseCopyable`
341
341
If this approach were taken, such casting could be back-deployed as far as the oldest OS in which this runtime representation was added.
342
342
Further back deployment would be possible by adding conformance records to back deployed binaries.
343
343
344
- #### Duck typing for BitwiseCopyable<a name =" casting-by-duck-typing " / >
344
+ #### Duck typing for BitwiseCopyable<a name =" casting-by-duck-typing " ></ a >
345
345
346
346
An alternative would be to dynamically treat any type that's bitwise-copyable as if it conformed to ` BitwiseCopyable ` .
347
347
@@ -391,7 +391,7 @@ The standard library has a few pre-existing functions that receive a generic bit
391
391
392
392
This proposal has benefitted from discussions with John McCall, Joe Groff, Andrew Trick, Michael Gottesman, and Arnold Schwaigofer.
393
393
394
- ## Appendix: Standard library conformers<a name =" all-stdlib-conformers " / >
394
+ ## Appendix: Standard library conformers<a name =" all-stdlib-conformers " ></ a >
395
395
396
396
The following protocols in the standard library will gain the ` BitwiseCopyable ` constraint:
397
397
@@ -440,7 +440,7 @@ The following types in the standard library will gain the `BitwiseCopyable` cons
440
440
- ` AtomicRepresentable.AtomicRepresentation `
441
441
- ` AtomicOptionalRepresentable.AtomicOptionalRepresentation `
442
442
443
- ## Appendix: Fluctuating bitwise-copyability<a name =" fluctuating-bitwise-copyability " / >
443
+ ## Appendix: Fluctuating bitwise-copyability<a name =" fluctuating-bitwise-copyability " ></ a >
444
444
445
445
Let's say the following type is defined in a framework built with library evolution.
446
446
0 commit comments