News for hackers. Stuff that matters.
Re:Type-safe Bitmasks in C++ by jerrre on Wednesday June 13, 2018 @03:38AM (#17301076)
edit: did not read correctly: https://godbolt.org/g/XjdL7i

-

    uint8_t controller_state = BTN_A | BTN_B;
if I read correctly this example would not be possible anymore right?

    bitmask<Button> controller_state = Button::A | Button::B;
or

    bitmask<Button> controller_state { Button::A | Button::B };
won't work.
Re:Type-safe Bitmasks in C++ by nice_byte on Wednesday June 13, 2018 @04:02AM (#17301187)
that's what the operator| at the end is for