[cxx-interop] Support using Swift Extensions from C++ #75295
Labels
c++ interop
Feature: Interoperability with C++
feature
A feature request or implementation
swift to c++
Feature → c++ interop: swift to c++
Motivation
I am building Swift classes that are exposed to C++.
Many of those Swift classes have functions that can throw errors, and since error throwing is not yet supported in C++ <> Swift interop (see #75290), I need to use some workaround.
I have this Swift class:
Now since I cannot call
doSomething()
from C++ (because itthrows
), I wanted to create an extension to wrap it in aResult
:..but unfortunately
doSomethingResult()
is also not available in C++, because it is anextension
.Proposed solution
It would be great if the generated C++ binding class would also pull in any extensions declared in Swift.
Alternatives considered
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: