[Bug c++/65299] Inheriting from two classes with increment operators

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 3 14:33:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65299

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
EDG rejects it for the same reason as GCC:

"c.cc", line 20: error: more than one operator "++" matches these operands:
            "C::operator++" (ambiguous by inheritance)
            operand types are: C ++
      c++;
       ^

"c.cc", line 21: error: more than one operator "++" matches these operands:
            "C::operator++" (ambiguous by inheritance)
            operand types are: ++ C
      ++c;
      ^



More information about the Gcc-bugs mailing list