c++: DR 1722: Make lambda to function pointer conv noexcept [PR90583]
authorMarek Polacek <polacek@redhat.com>
Mon, 21 Sep 2020 17:24:25 +0000 (13:24 -0400)
committerMarek Polacek <polacek@redhat.com>
Mon, 21 Sep 2020 22:13:37 +0000 (18:13 -0400)
commitdefceb206be0f803b8d94e746180e51adad20b87
tree872c615b9b5569c3385d9a387c50266f47ac214b
parent7029dfa38b663d20e0de40395fcd45a2845e2f71
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.
gcc/cp/lambda.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv14.C [new file with mode: 0644]