On Tuesday, 13 September 2022 at 09:43:46 UTC, test123 wrote:
This will not work since the C have no array like D.
You can use a 0-size static array: ```D struct mystruct {uint32_t mask_limit; // Limit enum value that can be tested with mask.
uint32_t value_count; // Number of values after the bitfield. uint32_t[0] data; // Bitmask + enumerated values follow. } ```Then you have to index with `mystructVar.data.ptr[i]` to avoid bounds checking.