3 ms·
Essential! "If new true friend not protected for explicit private union, break case and try using this." I often write if (not ... for emphasis. The "bit
by ncmncm 6y ago
Essential!
"If new true friend not protected for explicit private union, break case and try using this."
I often write
if (not ...
for emphasis. The "bitand" etc. are similarly useful where the operator might otherwise be mistaken for "&&" or, particularly, "||".
The only one that is an unfortunate choice is "compl", which just looks strange. When I feel a need to call attention to use of "~", I define a lambda "bitwise_not(bool)". But rarely.
- thestoicattack 6y agoYou could also use std::bit_not https://en.cppreference.com/w/cpp/utility/functional/bit_not https://en.cppreference.com/w/cpp/utility/functional/bit_not
- Koshkin 6y agoYou could, but the raison d'être of these operators-as-types is their usefulness in metaprogramming.
- WalterBright 6y agoI prefer: if not nowhow not noway ...