Suggest !
for bitwise negation when encountering a ~
#41679
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Uh oh!
There was an error while loading. Please reload this page.
Here's a program:
Its output:
Given that this is our only deviation from C-style bitwise operator syntax, it would be nice to have a note of some kind to suggest
!
here.Ideally the note would only appear when the
~
looks like it's being applied as a unary operator on a numeric type, but if that would require too much machinery then something simpler will suffice.The text was updated successfully, but these errors were encountered: