From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5701 invoked by alias); 23 Jan 2003 03:16:59 -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 5682 invoked by uid 48); 23 Jan 2003 03:16:59 -0000 Date: Thu, 23 Jan 2003 03:16:00 -0000 Message-ID: <20030123031659.5681.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, philippeb@videotron.ca From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, philippeb@videotron.ca, gcc-gnats@gcc.gnu.org Subject: Re: c++/7136: Template constants deduction X-SW-Source: 2003-01/txt/msg01322.txt.bz2 List-Id: Synopsis: Template constants deduction State-Changed-From-To: analyzed->closed State-Changed-By: bangerth State-Changed-When: Thu Jan 23 03:16:59 2003 State-Changed-Why: Nathan must have been having his afternoon nap when he confirmed this report :-) The code is actually illegal, and gcc tells you quite correctly what is wrong: ----------------------------- struct Type { int i; }; template struct Number {}; template void foo(Number<_T, int _T::*> const &) {} int main() { foo(Number()); } ------------------------------ In the argument list to foo(), the second template parameter to Number is "int T::*", which is a type, not a value. That's what the compiler is complaining about. In the call to foo(), the second argument is a value, as it should be. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7136