summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/parse6.C
blob: 73f7256d3caf1a16b795286e66366bab6168a279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* PR c++/3012 */
/* { dg-do compile } */

class A
{
  public:
    
    template <class T>
    void foo() const
    {
    }
};

template <class T>
class B
{
  public:
    
    void bar(const A& a) const
    {
	// Compile used to fail with parse error before `;' token
	a.foo<double>();
    }
};

int main()
{
    A a;
    B<int> b;
    b.bar(a);
}