1 // PR c++/42083
2 // { dg-do compile { target c++11 } }
3 
4 template<typename F>
decltype(F ())5 decltype(F()) run(F f) // { dg-message "note" "" { target c++17_down } }
6 {
7   return f();	// { dg-error "could not convert" "" { target c++2a } }
8 }
9 
main()10 int main()
11 {
12   auto l = []() { return 5; }; // { dg-message "lambda closure type" "" { target c++17_down } }
13 
14   run(l); // { dg-error "no match" "" { target c++17_down } }
15   // { dg-error "use of deleted function" "candidate explanation" { target c++17_down } 5 }
16 }
17