From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19739 invoked by alias); 6 May 2003 18:36:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19711 invoked by uid 71); 6 May 2003 18:36:02 -0000 Date: Tue, 06 May 2003 18:36:00 -0000 Message-ID: <20030506183602.19710.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Theodore Papadopoulo Subject: Re: c++/7033: [3.3/3.4 regression] [2003-05-30] Partial template specializations accepted even if a template parameter is used in a non-deduced context Reply-To: Theodore Papadopoulo X-SW-Source: 2003-05/txt/msg00407.txt.bz2 List-Id: The following reply was made to PR c++/7033; it has been noted by GNATS. From: Theodore Papadopoulo To: "Giovanni Bajo" Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, Lionel.Champalaune@sophia.inria.fr, Gabriel DOS_REIS Subject: Re: c++/7033: [3.3/3.4 regression] [2003-05-30] Partial template specializations accepted even if a template parameter is used in a non-deduced context Date: Tue, 06 May 2003 20:34:40 +0200 giovannibajo@libero.it said: > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7033 > The specialization should not be selected because §14.8.2.4p4 clearly > specifies that A::B is a non-deduced context for both T and Q. > But there's more: I'm confident that defining a partial template > specialization whose arguments can't be fully deduced from the > arguments of the original template is ill-formed. I kindly disagree. First §14.8.2.4p4 deals with "Function template specializations" not with "Class template specializations". The program might be invalid but not for this reason. Second, the specialization can fully be deduced from the template arguments (look again), so that your second affirmation is equally wrong. Both T and V are given in the instanciation. Actually, looking at the standard with Gaby today, it looks like that by §14.5.4.1p1, the unique specialization exactly matched by all the template parameters (which is the case here) should be selected.... I do not definitely claim that the example should compile because I do not know all the arcanes of the standard with this respect, but I have not yet seen an argument that forbids it. And moreover, forbidding this would be extremely surprising for the users without a proper message explaining the reasons for that... -------------------------------------------------------------------- Theodore Papadopoulo Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01 --------------------------------------------------------------------