Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv14.C

raw
1 // PR c++/90583
2 // DR 1722: Lambda to function pointer conversion should be noexcept.
3 // { dg-do compile { target c++11 } }
4
5 void
6 foo ()
7 {
8 auto l = [](int){ return 42; };
9 static_assert(noexcept((int (*)(int))(l)), "");
10 }