[SUGGESTION] bitfields support
Quick question: is there any plan to support bitfields?
I know that they don't get much love as a feature in the broader community, but there are applications where they are the only sane option.
Alternatives which have been considered are:
- To just write normal C++ structs/classes alongside Cpp2.
- To write custom getters/setters handling the layout.
If nothing I guess the reflection/codegen feature of Cpp2 could even improve upon bitfields as it was done for enums.
There's currently no bitfield implementation, closest thing would be @enum_flag, but thats for toggling individual bits and masking them together, you could try implementing a variant of what I described here: https://github.com/hsutter/cppfront/discussions/1390#discussioncomment-13012938 . I believe cppfront's reflection library has everything needed to do that, except accepting number only as identifiers.
Thanks for the reference, I totally missed discussions were enabled in this repo while searching.