Is Short Circuit Evaluation guaranteed In C++ as it is in Java?

Yes, it is guaranteed for the “built in” types. However, if you overload && or || for your own types, short-circuited evaluation is NOT performed. For this reason, overloading these operators is considered to be a bad thing.

Leave a Comment