Remix.run Logo
▲ The complement of true is true, except when it's false(dryperspective.github.io)
34 points by aw1621107 2 days ago | 6 comments
▲s-zeng 2 hours ago | parent | next [-]

In any field of characteristic 2, every element is its own negative. So on the surface this makes sense, notwithstanding the unintuitive enum corner case behaviour

▲yorwba 2 hours ago | parent [-]

The article is about the complement, not the negative.

▲rep_lodsb 4 hours ago | parent | prev | next [-]

They should have defined true as -1 (all bits set) instead, as in some other languages like Forth and BASIC.

▲pwdisswordfishq an hour ago | parent | prev | next [-]

I wonder if [[=std::bitmask_type]] also enables compiler warnings that a switch statement is not exhaustive if it does not cover all possible flag combinations.

▲glownagger an hour ago | parent | prev [-]

I thought attributes were reserved for compiler-specific semantics like calling conventions. Here they're just being used as stropping for a language feature with syntactic significance!

▲leni536 30 minutes ago | parent [-]

It's not an attribute, it's an annotation. Annotations start with [[= .

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p33...