From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22300 invoked by alias); 5 Jul 2011 19:48:46 -0000 Received: (qmail 22282 invoked by uid 22791); 5 Jul 2011 19:48:45 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jul 2011 19:48:32 +0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49637] template function overload incorrectly ambiguous 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: jason 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-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 Date: Tue, 05 Jul 2011 19:48:00 -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 X-SW-Source: 2011-07/txt/msg00359.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49637 --- Comment #9 from Jason Merrill 2011-07-05 19:48:14 UTC --- (In reply to comment #8) > OH. I think I see what you are saying here. I now think that you're saying > "the partial ordering will try to deduce the arguments regardless of whether or > not you tell it not to deduce it." Not exactly. The deduction done in partial ordering is not the same as the deduction done for the call itself; partial ordering tries to find template arguments which will make one signature match the other. Here, deducing U = int makes the first signature match the second, but T is only used in non-deduced context, so we don't have a value for it. If typename were a deduced context, we could deduce T = T and win. It's not clear to me why partial ordering requires that we deduce values for all used parameters anyway. I'm not sure what the EDG front end is doing here, I guess I'll raise it with the committee.