Skip to content

[interop][SwiftToCxx] add support for invoking methods in generic structs & unify function and struct generics #60892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 1, 2022

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Sep 1, 2022

This adds support for calling methods in generic structs from C++.
Some prerequisite patches:

  • unifying the generic model between functions and structs in C++
  • Using a struct type traits for type metadata accessor to allow partial specializations for type metadata accessor for generic structs.

Properties, initializers and more testing to be added in future patches

hyp added 2 commits August 31, 2022 15:31
…ruct printing

This is a pre-requisite for supporting methods in generic structs.
…of struct template

This allows partial template specializations for adding metadata accessor for generic types 🤩
@hyp hyp added the c++ interop Feature: Interoperability with C++ label Sep 1, 2022
@hyp hyp requested review from egorzhdan and zoecarver September 1, 2022 03:01
@hyp
Copy link
Contributor Author

hyp commented Sep 1, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Sep 1, 2022

@swift-ci please test source compatibility

@hyp hyp changed the title [interop][SwiftToCxx] add support for invoking methods in generic structs & unify function and struct generic [interop][SwiftToCxx] add support for invoking methods in generic structs & unify function and struct generics Sep 1, 2022
@hyp hyp force-pushed the eng/generic-struct-method branch from 75dbd13 to a5043c3 Compare September 1, 2022 03:19
@hyp
Copy link
Contributor Author

hyp commented Sep 1, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Sep 1, 2022

@swift-ci please test source compatibility

@hyp
Copy link
Contributor Author

hyp commented Sep 1, 2022

@swift-ci please test macOS platform

@hyp hyp merged commit 270fde9 into swiftlang:main Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant