This is the mail archive of the gcc-bugs@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]

[Bug c++/14566] New: 'template' disambiguator rejected on base class


The 'template' disambiguator keyword on the base of B below causes the 
following error: "expected class-name before '{' token".  This code compiles in 
GCC 3.3.1.  Test case:

struct A
{
	template <class F>
	struct X
	{
	};
};

template <class F>
struct B : public A::template X<F>
{
};

gcc -v output:
Reading specs from /gcc-3.4/lib/gcc/i686-pc-cygwin/3.4.0/specs
Configured with: ../gcc/configure --prefix=/gcc-3.4 --enable-languages=c,c++,f77
--enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --withou
t-included-gettext --enable-interpreter --enable-version-specific-runtime-libs -
-enable-shared --disable-win32-registry --enable-java-gc=boehm --disable-hash-sy
nchronization --verbose
Thread model: posix
gcc version 3.4.0 20040312 (prerelease)

-- 
           Summary: 'template' disambiguator rejected on base class
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ron_hylton at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14566


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