http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57311

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If the definitions are not inline G++ spots the problems:

typedef int Int;

struct X
{
    operator int() const;
    operator Int() const;
};

X::operator int() const { return 0; }
X::operator Int() const { return 0; }



x.cc:10:1: error: redefinition of 'X::operator Int() const'
 X::operator Int() const { return 0; }
 ^
x.cc:9:1: error: 'X::operator int() const' previously defined here
 X::operator int() const { return 0; }
 ^

Reply via email to