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

valuetypes constrains #74

Open
luke-titley opened this issue Apr 15, 2021 · 0 comments
Open

valuetypes constrains #74

luke-titley opened this issue Apr 15, 2021 · 0 comments
Milestone

Comments

@luke-titley
Copy link
Collaborator

luke-titley commented Apr 15, 2021

This is a proposal for a constraint I think we will need to have on value types.

'A valuetype record can only have fields that are also valuetype or opaquebytes'. It should be an error either in astgen or in asttoc if a user marks a record as valuettype but one of it's fields is opaqueptr.

The reason for this constrain is that it's the only way we can guarantee that the c struct has a one for one memory layout of it's c++ equivalent.

The effect of this constraint is that a record containing stl types cannot be exposed as valuetype.

@scott-wilson scott-wilson added this to the mvp milestone Apr 24, 2021
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

No branches or pull requests

2 participants