Except that you cannot always write the condition in that way since you may be comparing two non-const lvalues... unless you're really suggesting always ensuring that the left hand side is an rvalue or non-const lvalue, but if you can always remember that, then you can always remember not to use = when you mean ==.

Originally Posted by Bjarne Stroustrup (2000-10-14)

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

It becomes a problem when I actually want to do an assignment and a boolean check at the same time. I wouldn't want future code maintainers to panic when those warnings pop up... possibly causing them to think I didn't know what I was doing.