From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4950 invoked by alias); 30 Jun 2002 09:57:18 -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 4928 invoked by uid 61); 30 Jun 2002 09:57:17 -0000 Date: Sun, 30 Jun 2002 02:58:00 -0000 Message-ID: <20020630095717.4926.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, ofv@wanadoo.es From: nathan@gcc.gnu.org Reply-To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, ofv@wanadoo.es, gcc-gnats@gcc.gnu.org Subject: Re: c++/7166: Non-type template instantiation fails for pointer types X-SW-Source: 2002-06/txt/msg00733.txt.bz2 List-Id: Synopsis: Non-type template instantiation fails for pointer types State-Changed-From-To: open->closed State-Changed-By: nathan State-Changed-When: Sun Jun 30 02:57:04 2002 State-Changed-Why: not a bug. Like the error says, you are attempting to instantiate a template on a non-externally visible object (the thing pointer to *by* strPointer). The array case works becuase of array->pointer decay - the thing pointed to is the first array element, and that does have external linkage. May be you mean to write template class Foo {}; which would be acceptable for the first case, as then you're binding to the pointer variable. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7166