DIP: add Bit Fields

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Mar 9 15:13:23 UTC 2024


I've had a bit of thought about the ABI concerns of having multiple 
layouts possible.

I think its better to ignore the ABI altogether when changing it.

```d
import core.attributes : bitfieldlayout;

struct Foo {
	@bitfieldlayout("packed") {
		int bar:1;
		int zah:2;
	}
}
```

That'll also solve how do we add new ones that isn't C or packed.

C can be default, that need not be changed to something else.


More information about the dip.development mailing list