This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/6601: Parse error when using :: qualified name in template.
- From: rhauser at fnal dot gov
- To: gcc-gnats at gcc dot gnu dot org
- Date: Tue, 7 May 2002 17:25:01 -0500
- Subject: c++/6601: Parse error when using :: qualified name in template.
- Reply-to: rhauser at fnal dot gov
>Number: 6601
>Category: c++
>Synopsis: Parse error when using :: qualified name in template.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue May 07 15:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Reiner Hauser
>Release: 3.0.2
>Organization:
Michigan State University
>Environment:
Linux RedHat 7.1 with local changes
System: Linux wensley-clued0 2.4.14-0.1XFSsmp #1 SMP Mon Nov 12 09:22:08 CST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/scratch/1/veseli/gcc --with-gnu-as --with-gnu-ld --enable-shared --enable-threads --enable-languages=c,c++
>Description:
When instantiating a template class with a another class qualified
with :: the compiler reports a parse error. This is true both for standard
templates like vector or user defined templates.
>How-To-Repeat:
template<class T>
class MyTemplate
{
};
class X {};
MyTemplate<::X> test;
>Fix:
Replacing ::X with 'class ::X' allows to work around the problem.
>Release-Note:
>Audit-Trail:
>Unformatted: