You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this great library. I just wanted to report that arrays, unions and bitfields are all not working and causing compilation issues.
I can imagine supporting any of these 3 might be hard, but maybe there is a way to fix these, hence the report.
The godbolt sample shows the behaviour:
Thanks @momo5502, yeah there are limitations of the technique. There are probably some ways to workaround some of it but not sure about unions and bitfields as that's really special.
One way which is to use opaque types with the same underlying representation, something like:
While that might certainly work, it's not an option for me. I'm using reflection for types from Windows.h and Microsoft, sadly, seems to love bitfields and unions :(
I appreciate a lot that you posted the issue and that Kris posted the workaround. I need to support a few legacy file formats, but thankfully I can write my types, so a variant and the bitfield trick (nice! I wasn't expecting that would work) could do for me. Thank you both!
Thank you for this great library. I just wanted to report that arrays, unions and bitfields are all not working and causing compilation issues.
I can imagine supporting any of these 3 might be hard, but maybe there is a way to fix these, hence the report.
The godbolt sample shows the behaviour:
https://godbolt.org/z/r9KG8fEqE
The text was updated successfully, but these errors were encountered: