Cf. http://wg21.link/cwg1722 void foo () { auto l = [](int){ return 42; }; static_assert(noexcept((int (*)(int))(l)), ""); }
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554425.html
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:defceb206be0f803b8d94e746180e51adad20b87 commit r11-3336-gdefceb206be0f803b8d94e746180e51adad20b87 Author: Marek Polacek <polacek@redhat.com> Date: Mon Sep 21 13:24:25 2020 -0400 c++: DR 1722: Make lambda to function pointer conv noexcept [PR90583] DR 1722 clarifies that the conversion function from lambda to pointer to function should be noexcept(true). gcc/cp/ChangeLog: PR c++/90583 DR 1722 * lambda.c (maybe_add_lambda_conv_op): Mark the conversion function as noexcept. gcc/testsuite/ChangeLog: PR c++/90583 DR 1722 * g++.dg/cpp0x/lambda/lambda-conv14.C: New test.
Fixed.