summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice20.C
blob: ae1b61b1d2ced88b6f207f187f39e54bc6658d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/61362
// { dg-do compile { target c++11 } }

template <typename>
struct S {
  int f{[this](){return 42;}()};
};

int main(){
  return S<int>{}.f; // should be 42
}