Skip to content
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

Provide helpers to bridge Windows.Foundation.Collections and Swift collections #26

Open
tristanlabelle opened this issue Nov 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@tristanlabelle
Copy link
Owner

No description provided.

@tristanlabelle
Copy link
Owner Author

Started in #99

@tristanlabelle
Copy link
Owner Author

It turns out supporting a conversion from Swift.Array<Element> to IVector<Element> in the support module might not be feasible. Trying to summarize:

  • IVector<T> virtual tables rely on T-specific code generation because the ABI for things like the IndexOf(T) function pointer is incompatible between a struct and a reference type, for example. C++ can generalize this because of its templates, but Swift cannot.
  • The object generated needs to have a QueryInterface implementation that knows about both IVector and IIterable as to be able to synthesize both virtual tables.

Maybe this is implementable with a class ArrayVector<IVectorProjection, IIterableProjection>: WinRTExport<IInspectableProjection>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant