From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32725 invoked by alias); 12 Oct 2004 06:46:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32715 invoked by uid 48); 12 Oct 2004 06:46:36 -0000 Date: Tue, 12 Oct 2004 06:46:00 -0000 Message-ID: <20041012064636.32714.qmail@sourceware.org> From: "mmitchel at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040911043255.17413.gdr@gcc.gnu.org> References: <20040911043255.17413.gdr@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17413] [3.4/4.0 regression] local classes as template argument X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg01560.txt.bz2 List-Id: ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-10-12 06:46 ------- The bug here is that we are checking complain at all. SFINAE does not say that when given a set of overload candidates you perform type deduction and then discard any candiates for which an any error occurs. Instead, you perform type deduction and discard any candidates for which type deduction fails, which is a defined term in [temp.deduct]. Type deduction fails only under precise circumstances; using a local class as a template argument is not a case in which type deduction fails. It looks like people have been throwing around "complain & tf_error" checks too freely in pt.c. The question is then what happens after type deduction succeeds. Should we emit an error before doing overload resolution, or only if the invalid function is selected from the overload set? DR 415 is a related issue and the proposed resolution suggests that errors about invalid substitutions may be issued before overload resolution. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17413