From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10350 invoked by alias); 17 May 2013 10:04:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10324 invoked by uid 48); 17 May 2013 10:04:12 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57311] New: Conversion operator can be overloaded with itself by using typedef Date: Fri, 17 May 2013 10:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg01184.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57311 Bug ID: 57311 Summary: Conversion operator can be overloaded with itself by using typedef Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org This should be rejected: typedef int Int; template struct is_same { enum { value = 0 }; }; template struct is_same { enum { value = 1 }; }; struct X { operator int() const { return 0; } operator Int() const { return 0; } }; static_assert( is_same::value, "Int is int" );