There's unfortunately a good, but breaking change necessitating this breaking release. The default-zero arg constructor for any bitfield has been removed. In previous versions, this constructor zero-initialized all fields. This however clashes with a zero-arg constructor for a bitfield that solely consists of padding (which is useful in some contexts), and hence had to be removed. For the same reason, it's not possible to give a deprecation notice. Users are encouraged to transition to the use of zero
, which zero-initializes the bitfield just the same as the old zero-arg constructor would have - it is a drop-in replacement :)
New features/other fixes:
- Fixes some hygiene bugs when calling some of the expression building functions/macros in other external macros.
- Accessing a field now also returns the smallest possible
Unsigned
capable of holding the field value, instead ofUInt
in all cases. - A new function
bitfieldnames
, which gives the names that have been defined for a bitfield. This is the bitfield equivalent tofieldnames
, intended to be used in cases where the names of a bitfield purely from a type are required.
Full Changelog: v0.3.9...v0.4.0