x = y is an expression statement in C++, which can be evaluated in an "if" for its side-effects.
https://en.wikipedia.org/wiki/Expression_(computer_science)