aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/error3.C
blob: 75390f0bf2b1e87f763bf5b57cb7f30a52ca252c (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
// PR c++/47336
// { dg-do compile { target c++11 } }

template <typename T>
void g(T t)
{
  t+1;				// { dg-error "no match" }
}

template <typename S>
class C
{
  struct D {} d;
public:
  decltype(g(d)) h()
  {
    return g(d);
  }
};

int main()
{
  C<int>().h();
}