Open JaciBrunning opened 2 days ago
This hasn't come up very much, so I'm inclined to not handle it automatically. You'll need to write your own binding code.
std::variant
is a more modern way of implementing this pattern. If you use std::variant
instead as your result, that should be supported out of the box.
Problem description
Given the following struct:
The generator fails to generate the class with "ValueError: not sure how to handle 'union <>`
The expected behaviour is to treat it as a tagged union, exposing both variants as class fields and leaving it to the user to discriminate them.
Operating System
Windows
Installed Python Packages
No response
Reproducible example code
No response