Is there an Non-Short circuited logical “and” in C++?

The & operator performs logical “and” operation for bool operands and is not short circuited.

It’s not a sequence point. You cannot rely on the order of evaluation of the operands. However, it’s guaranteed that both operands are evaluated.

I do not recommend doing this. Using temporary variables is a better solution. Don’t sacrifice readability for “clever code”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)