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

struct Base
{
  virtual int b() const{return 1;};
};

struct Super:Base{};

int main()
{
  constexpr Super s;
  []{s.b();}();  // { dg-error "not captured" }
}