From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32520 invoked by alias); 22 Oct 2002 23:56:04 -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 32489 invoked by uid 71); 22 Oct 2002 23:56:03 -0000 Date: Tue, 22 Oct 2002 16:56:00 -0000 Message-ID: <20021022235603.32488.qmail@sources.redhat.com> To: nathan@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/45: Template Specialization Reply-To: Wolfgang Bangerth X-SW-Source: 2002-10/txt/msg00855.txt.bz2 List-Id: The following reply was made to PR c++/45; it has been noted by GNATS. From: Wolfgang Bangerth To: gcc-bugs@gcc.gnu.org, Cc: Subject: Re: c++/45: Template Specialization Date: Tue, 22 Oct 2002 18:51:23 -0500 (CDT) Someone should re-name this report to "Matching of partial specialization of classes" Here's a redux: ----------------------------------------- template struct Int {}; template struct Char{}; template struct X; template struct X< Char, Int > { typedef Int val; }; template struct X< Int, Char > { typedef Int val; }; X< Int<0>, Char<'1'> >::val i; ---------------------------------------- In ways I don't understand, this bug goes away if in the declaration of the second partial specialization, "int N" and "char C" is reversed, something that should have absolutely no effect on matching of templates. In some other ways I do not understand either, the problem also goes away if I change the template argument of "Char" from "char" to "int", something that should also not affect matching, but does. Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth