OSDN Git Service

PR c++/28606
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / parse / parse6.C
1 /* PR c++/3012 */
2 /* { dg-do compile } */
3
4 class A
5 {
6   public:
7     
8     template <class T>
9     void foo() const
10     {
11     }
12 };
13
14 template <class T>
15 class B
16 {
17   public:
18     
19     void bar(const A& a) const
20     {
21         // Compile used to fail with parse error before `;' token
22         a.foo<double>();
23     }
24 };
25
26 int main()
27 {
28     A a;
29     B<int> b;
30     b.bar(a);
31 }