This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/3889: Problems with template parameter dependant name
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: c++/3889: Problems with template parameter dependant name
- From: fasbjx at libertysurf dot fr, Branjonneau at free dot fr
- Date: Tue, 31 Jul 2001 04:45:20 +0200 (CEST)
- Reply-To: fasbjx at free dot fr
>Number: 3889
>Category: c++
>Synopsis: Problems with template parameter dependant name
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Jul 30 19:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Franck Branjonneau
>Release: 3.0 (Debian) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux alpha.tchume.net 2.4.4 #2 mar mai 22 08:16:07 CEST 2001 i586 unknown
Architecture: i586
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
The following code:
template< typename T >
struct S {};
// 1
template< typename T, int = S< T >::X::x >
class C {};
don't compile. From codesourcery:
GCC Output
These are the results of processing your source code with the following command:
g++ [input]
Exit code: 256
Messages:
/usr/tmp/@28107.7.cc:5: parse error before `::' token
Note that gcc gives the same error with:
template< typename T >
struct S {};
// 2
template< typename T >
class C {
static int const i = S< T >::X::x;
};
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: