- To: gcc-bugs at gcc dot gnu dot org
- Subject: nested template misclassified
- From: Larry Evans <cppljevans at earthlink dot net>
- Date: Tue, 09 May 2000 06:08:57 -0500
In the following bug report, the compiler apparently believes C<S>::V
is not a template, but it is.
-------------- cut here --------------------
cd /home/evansl/prog_dev/gcc_all/gcc-2.95.2/tests/2.96_CurryTmpl/
make -k
uname -a
Linux localhost.localdomain 2.2.13-4mdk #1 Tue Sep 7 18:23:11 CEST 1999
i586 unknown
g++ -v
Reading specs from
/home/evansl/prog_dev/gcc_all/dist/lib/gcc-lib/i586-pc-linux-gnu/2.96/specs
gcc version 2.96 20000507 (experimental)
g++ -E main.cpp
# 1 "main.cpp"
struct
S
{};
struct
T
{};
template
< template<typename U>class V
>
struct
A
{ V<T> v;
};
template
< typename S
, typename T
>
struct
B
{ S s;
T t;
};
template
< typename S
>
struct
C
{
template
< typename T
>
struct
V
: public B<S,T>
{};
};
int
main(void)
{
; A<C<S>::V> y
; return 0
;}
../../../dist/bin/g++ -c -Wall main.cpp
main.cpp: In instantiation of `A<C<S>::V>':
main.cpp:46: instantiated from here
main.cpp:17: `V' is not a template
main.cpp: In function `int main ()':
main.cpp:46: warning: unused variable `A<C<S>::V> y'
make: *** [compile] Error 1
make: Target `all' not remade because of errors.
Compilation exited abnormally with code 2 at Mon May 8 09:01:26