But I find this problem with float inside union:
```d
struct test_t {
union {
int i32;
float f32;
}
}
static assert(__traits(isZeroInit, test_t) );
```
```sh
Error: static assert: `__traits(isZeroInit, test_t)` is false
```
I consider this is compiler bug (it may take years to get fixed),
so I am here to ask any way to workaround this problem?
need help to work around float union non-zero init
Dakota via Digitalmars-d-learn Fri, 20 Sep 2024 02:41:46 -0700
I need my struct defined as `isZeroInit`, so can I can import
them as `di` file. (this also reduce build size)
- need help to work around float unio... Dakota via Digitalmars-d-learn
- Re: need help to work around f... IchorDev via Digitalmars-d-learn
- Re: need help to work around f... monkyyy via Digitalmars-d-learn
- Re: need help to work around f... Nick Treleaven via Digitalmars-d-learn
- Re: need help to work arou... Dakota via Digitalmars-d-learn
