aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C
blob: 89e4e4babf573ee1d8822e1733605af15129d162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/55710
// { dg-do link { target c++11 } }

template <class T>
struct X {
  static void (*code) ();
};

template <class T>
void (*X<T>::code) () = []{};  // Line 7

struct Y {
  void (*code) () = []{} ; // Line 10
  void operator()() { code(); }
};

int main () {
  X<int>::code();
  Y()();
}