Skip to content

Commit 46ff73b

Browse files
egorzhdanj-hui
andauthored
Apply suggestions from code review
Co-authored-by: John Hui <[email protected]>
1 parent 485c741 commit 46ff73b

File tree

1 file changed

+3
-4
lines changed
  • documentation/cxx-interop/safe-interop

1 file changed

+3
-4
lines changed

documentation/cxx-interop/safe-interop/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,7 @@ void copyView(View view1 [[clang::lifetime_capture_by(view2)]], View &view2) {
341341
}
342342
```
343343
344-
In this example, `view2` will have get all of the lifetime dependencies of `view1`
345-
after a call to `copyView`. a
344+
Here, `view2` inherits the lifetime dependencies of `view1`, so callers of `copyView` must ensure that whatever they pass as `view2` does not outlive `view1`.
346345
347346
We can use this annotation to specify that a parameter's lifetime dependencies are captured by the implicit `this` object, or
348347
conversely, that an inout argument captures the lifetime dependencies of `this`:
@@ -392,8 +391,8 @@ types, and the user with a safe and convenient interface to those imported APIs.
392391
### C++ `std::span` Support
393392
394393
APIs taking or returning C++'s `std::span` with sufficient lifetime
395-
annotations will automatically get overloads taking/returning Swift
396-
`Span`.
394+
annotations will automatically get safe overloads take or return Swift
395+
`Span` and `MutableSpan` types.
397396
398397
The following table summarizes the generated convenience overloads:
399398

0 commit comments

Comments
 (0)