summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
blob: 352137aad241907bbe4575ba78c1f8b421856919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/42083
// { dg-options "-std=c++0x" }

template<typename F>
decltype(F()) run(F f) // { dg-message "note" }
{
  return f();
}

int main()
{
  auto l = []() { return 5; };

  run(l); // { dg-error "no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 14 }
}