------- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-05 04:31 ------- effcpp01.cxx:3: warning: user-defined 'a a::operator||(const a&)' always evaluates both arguments
I don't see why this is ambiguous. Because normally || is short ciruting in that if the left hand side is true the other side is not evaluated. And it is has nothing to do with optimization but rather correct behavior. so with user defined operator||, you have to evaluate both sides which is different than the default behavior which then could cause different behavior. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29348