Skip to content

valuetypes constrains #74

@luke-titley

Description

@luke-titley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions