summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/bracket4.C
blob: 0e1985ceff957f74b5c2e800f80fe1798f201a7c (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
32
33
34
35
// { dg-do compile }
// { dg-options "-std=c++0x" }
template<typename T>
struct vector { 
};

struct X {
  template<typename T>
  struct tmpl { 
    operator T() const;
  };
};

template<typename T>
void g()
{
  T::template tmpl<vector<int>>() + 2;
}

template<typename T>
void operator+(vector<T>, int);

void f()
{
  vector<vector<int>>() + 2;
}

// PR c++/36460
template <class a>
class A {};
template <class b>
class B {};

A<B<void()>> x;