Skip to content

[interop][SwiftToCxx] initial generic struct support #60848

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 12 commits into from
Sep 1, 2022

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Aug 30, 2022

Initial patch only adds support for passing and returning direct generic values , without supporting concrete instantiations, or using them in generic context, or even methods on them. More to come.

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Aug 30, 2022
@hyp hyp requested review from egorzhdan and zoecarver August 30, 2022 14:06
@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

might need a bit of cleanup first.

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test linux platform

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

Added support for passing/returning concrete-type bounded generics

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 30, 2022

@swift-ci please test source compatibility

printGenericTypeParamTypeName(genericParamType);
});
os << ">\n";
os << "requires ";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I missed this: does the generated header always require C++20?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment yes, this will be relaxed in the future.

@hyp hyp force-pushed the eng/generic-type-1 branch from 6df0996 to 907b3a9 Compare August 31, 2022 21:02
@hyp
Copy link
Contributor Author

hyp commented Aug 31, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 31, 2022

@swift-ci please test source compatibility

@hyp
Copy link
Contributor Author

hyp commented Aug 31, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Aug 31, 2022

@swift-ci please test source compatibility

@hyp hyp merged commit 983e2f3 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.

2 participants