language: C++ 4.7.2 (gcc-4.7.2)
date: 580 days 20 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
template <typename T>
class Foo {
        T x;
public:
        Foo(T val = 0):x(val) {
        }
};
 
template < template <typename T2>
                   class T>
class Bar {
        T2 y
public:
        Bar(T2 val = 0):y(val) { }
};
 
int main()
{
        Bar<Foo<int>> b = 42;
}
prog.cpp:12: error: ‘T2’ does not name a type
prog.cpp: In function ‘int main()’:
prog.cpp:19: error: ‘>>’ should be ‘> >’ within a nested template argument list
prog.cpp:19: error: type/value mismatch at argument 1 in template parameter list for ‘template<template<class T2> class T> class Bar’
prog.cpp:19: error:   expected a class template, got ‘Foo<int>’
prog.cpp:19: error: invalid type in declaration before ‘=’ token
prog.cpp:19: warning: unused variable ‘b’