You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the initial version we'll only support passing C++ types as template arguments, plus a small hardcoded set of Swift primitive types (converted to corresponding C++ types behind the scenes).
The text was updated successfully, but these errors were encountered:
PR #33284 implements basic support for instantiating C++ class templates from Swift.
What doesn't work is:
template template parameters - Currently C++ class templates are imported as generic structs, and Swift cannot substitute generic arguments with a generic struct with unsubstituted arguments.
non-type parameters - Currently, Swift only allows types as generic arguments.
variadic parameters - Currently clang importer will not notice the parameter is variadic and will expect that there is only one parameter. There's no way to use specializations with more or fewer parameters from Swift.
nested types of instantiated templates cannot be serialized/deserialized in modules (therefore they cannot be used across module interface)
Additional Detail from JIRA
md5: 55b08f175ae8509127468b5b5b9af809
Issue Description:
I.e. allow using following C++ header:
in Swift like:
In the initial version we'll only support passing C++ types as template arguments, plus a small hardcoded set of Swift primitive types (converted to corresponding C++ types behind the scenes).
The text was updated successfully, but these errors were encountered: