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

First steps towards generics #274

Merged
merged 1 commit into from
Jul 30, 2022
Merged

First steps towards generics #274

merged 1 commit into from
Jul 30, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Jul 30, 2022

This adds a TypeParam interface capturing operations we will need in order to support generics, and makes sure that the expected types implement it.

Not super useful on its own, but in the interest of keeping PRs small and easy to review...

@zenhack zenhack requested a review from lthibault July 30, 2022 05:21
@zenhack
Copy link
Contributor Author

zenhack commented Jul 30, 2022

Just tacked on one more commit, which makes Ptr implement TypeParam as well. But probably should not have a giant generics pr, so once you're happy we should merge.

capability.go Outdated Show resolved Hide resolved
...and implement it for basic pointer types, and generated types where
appropriate.

This is the first step on generics support.
@zenhack
Copy link
Contributor Author

zenhack commented Jul 30, 2022

Rebased on top of main, dropped a bit of generated code rendered unnecessary by the embedding.

@lthibault lthibault merged commit 73863fa into capnproto:main Jul 30, 2022
@zenhack zenhack deleted the generics branch July 30, 2022 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants