Closed
Description
Must-fixes for Swift-5.9
This section tracks all of the C++ interoperability fixes we would like to have in the Swift-5.9 release.
They're categorized by different groups presented below:
"Forward" interop - using C++ APIs in Swift
- [C++-Interop] C++ struct passed by value to an objc_msgSend is passed as a pointer type of ABIArgInfo::Direct instead of a Indirect byval #61929
- [interop] C++ function returning
NonCopyable
type returnsNever
in Swift and is callable #64401 - [cxx-interop] Name lookup failures in C++20 mode on Linux #65710
- [C++-Interop][Swift 5.9] Invoking a manually defaulted non-noexcept C++ constructor from Swift results in a compiler crash in IRGen #65891
- [cxx-interop]
std::optional
should provide nullable access to the wrapped object #65918 - [cxx-interop] Add a SWIFT_MUTATING macro to <swift/bridging> header #66322
- [cxx-interop] Finalize Swift 5.9 rules that determine when inherited members that shadow other members can be introduced to the Swift type that represents the C++ structure or class #66323
- [interop] Tracking issue to track support for immutable noncopyable borrows for C++ types in Swift #61454
- [cxx-interop] Enabling C++ interop leads to linking errors with URL.bookmark() #66501
- Xcode-beta (15.0) C++ interop option generates erroneous 'let' property initialization code #66523
- std::vector<std::string> fails to conform to CxxRandomAccessCollection #67410
"Reverse" interop - using Swift APIs in C++
- [cxx-interop] ensure that copy-assignment operator works for Swift value types in C++ #66324
- Cxx to Swift interop - issue with Array and Int type - "type cannot be used in a Swift generic context" #63452
Build / platform-specific fixes
- Windows toolchain - swiftToCxx directory missing #63446
- [cxx-interop] fix the C++ methods dispatch for the Windows target #66326
- windows: test C++ stdlib support
- Swift cannot use
-enable-experimental-cxx-interop
on Linux with Foundation #64457 (linux & libstdc++)
SwiftPM usability
Compiler support for @_implementationOnly
imports:
Improved diagnostics when importing things requiring C++ interop:
- [cxx-import] a Swift module that imports a C++ module and forces the client to enable interop produces unclear diagnostic #65833
- [cxx-import] a Swift module that imports 'CxxStdlib' and forces the client to enable interop produces unclear diagnostic #65832
SwiftPM fixes: