The ~ operator negates the underlying integer value and something like ~Flags(empty) is thus in general not equal to or-ing all flags.
See an example here: https://wandbox.org/permlink/RQGdNMjBO0RE2tDy
Is there a way this can be fixed? I guess somehow the maximum Flag value would need to be determined somehow...
The
~operator negates the underlying integer value and something like~Flags(empty)is thus in general not equal to or-ing all flags.See an example here: https://wandbox.org/permlink/RQGdNMjBO0RE2tDy
Is there a way this can be fixed? I guess somehow the maximum Flag value would need to be determined somehow...