From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18893 invoked by alias); 5 May 2003 11:26:01 -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 18879 invoked by uid 71); 5 May 2003 11:26:01 -0000 Date: Mon, 05 May 2003 11:26:00 -0000 Message-ID: <20030505112601.18878.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Giovanni Bajo" 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: "Giovanni Bajo" X-SW-Source: 2003-05/txt/msg00274.txt.bz2 List-Id: The following reply was made to PR c++/7033; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , , Cc: 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: Mon, 5 May 2003 13:20:01 +0200 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. In fact, GCC correctly rejects this: ----------------------------------------------- template struct K; template struct K {}; ----------------------------------------------- pr7033.cpp:4: error: template parameters not used in partial specialization: pr7033.cpp:4: error: `T' but it fails to reject this: ----------------------------------------------- template struct S; template