This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6601: Parse error when using :: qualified name in template.



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]