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.
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+
13381348As outlined
13391349[ earlier] ( #member-functions-returning-references-are-unsafe-by-default ) ,
13401350member functions that return references, pointers, or certain structures/classes that
You can’t perform that action at this time.
0 commit comments