Skip to content

Add querying offsets #38

@petar-andrejic

Description

@petar-andrejic

A feature that would be helpful for me would be reflecting over member offsets, as this would allow use cases like automatic generation of vertex attributes in graphics programming for example. I've managed to hack together something for the VISITABLE_STRUCT macro, however I believe this is not possible to implement intrusively as this would require getting the offset of an incomplete type.

I don't fully understand how the templates etc work so I imagine it won't be optimal, but I did manage to hack something together, so I'll add a pull request for review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions