File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
documentation/cxx-interop Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1335,6 +1335,16 @@ automatically.
1335
1335
1336
1336
## Working with C++ References and View Types in Swift
1337
1337
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
+
1338
1348
As outlined
1339
1349
[ earlier] ( #member-functions-returning-references-are-unsafe-by-default ) ,
1340
1350
member functions that return references, pointers, or certain structures/classes that
You can’t perform that action at this time.
0 commit comments