From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30893 invoked by alias); 6 May 2003 23:56: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 30875 invoked by uid 71); 6 May 2003 23:56:00 -0000 Date: Tue, 06 May 2003 23:56:00 -0000 Message-ID: <20030506235600.30874.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/msg00425.txt.bz2 List-Id: The following reply was made to PR c++/7033; it has been noted by GNATS. From: "Giovanni Bajo" To: "Theodore Papadopoulo" Cc: , , , , , "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: Wed, 7 May 2003 01:46:12 +0200 Theodore Papadopoulo wrote: > 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. Sure, but the deduction rules are exactly the same. It's clearly stated in §14.5.4.1p2 [temp.class.spec.match]: "A partial specialization matches a given actual template argument list if the template arguments of the partial specialization can be deduced from the actual template argument list (14.8.2)". Note that it refers _exactly_ to §14.8.2 as The Way to match a partial specialization. In fact, §14.8.2.4 is called "Deducing template arguments from a type", and §14.8.2 is "Template argument decuction". Those are _the_ rules to deduce template arguments, either to deduce arguments for a function template call, or to match a partial specialization. > 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. No. You don't specify T and V in the instanciation. Let's look at it again: --------------------------- template struct S; template