c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Compile time bitwise operators for bitstruct

Open cbuttner opened this issue 1 year ago • 3 comments

bitstruct Flags : int {}
const Flags FLAGS_A = Flags {};
const Flags FLAGS_B = Flags {};
const Flags FLAGS_C = FLAGS_A | FLAGS_B;
                      ^^^^^^^^^^^^^^^^^
Error: The expression must be a constant value.

cbuttner avatar Feb 03 '24 21:02 cbuttner

Yes, this is not yet supported.

lerno avatar Feb 04 '24 00:02 lerno

This should be fixed in the upcoming 0.5.4.

lerno avatar Feb 04 '24 00:02 lerno

@cbuttner Does this work as expected now?

lerno avatar Mar 01 '24 13:03 lerno

This works as it should. Thank you.

cbuttner avatar Apr 09 '24 13:04 cbuttner