From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11101 invoked by alias); 4 Dec 2012 10:48:41 -0000 Received: (qmail 8082 invoked by uid 48); 4 Dec 2012 10:47:39 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55576] Fails to compile a call to template member function Date: Tue, 04 Dec 2012 10:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-12/txt/msg00352.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55576 --- Comment #5 from Marc Glisse 2012-12-04 10:47:38 UTC --- For the example of comment #3, clang compiles it happily, and comeau gives this message: "ComeauTest.c", line 12: error: type name is not allowed return f.template apply(address); ^ "ComeauTest.c", line 12: warning: ambiguous class member reference -- function template "factory::apply" (declared at line 3) used in preference to type "apply::apply [with T=int]" (declared at line 9) return f.template apply(address); ^ detected during instantiation of "void *apply::operator()(const FactoryT &, void *) const [with T=int, FactoryT=factory]" at line 18