summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
blob: 4abdf59a6926fe117c6f867005c45e701e709f8f (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-options "-std=c++0x" }
#include <cassert>

int main() {
  int i = 0;
  int& r = [&] () { return i; } (); // { dg-error "" "invalid initialization of non-const reference of type .int&. from a temporary of type .int." }

  return 0;
}