Skip to content

Commit e52e43f

Browse files
authored
[cxx-interop] Add link to safe interop documentation
This adds a publicly visible link to the new safe interop documentation from the main C++ interop documentation page.
1 parent 19ae734 commit e52e43f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

documentation/cxx-interop/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,16 @@ automatically.
13351335

13361336
## Working with C++ References and View Types in Swift
13371337

1338+
<div class="info" markdown="1">
1339+
Swift 6.2 introduces a new [safe interoperability](https://www.swift.org/documentation/cxx-interop/safe-interop)
1340+
mode, which makes it possible to use C/C++ pointers and specific view types,
1341+
such as `std::span`, safely from Swift. We recommend enabling safe
1342+
interoperability mode, since it provides stronger safety guarantees. The
1343+
features described in the following section can still be used in cases where the
1344+
safe interoperability features do not apply or are overly restrictive, e.g. for
1345+
APIs returning C++ references.
1346+
</div>
1347+
13381348
As outlined
13391349
[earlier](#member-functions-returning-references-are-unsafe-by-default),
13401350
member functions that return references, pointers, or certain structures/classes that

0 commit comments

Comments
 (0)