Skip to content

bugfix: allow noexcept lambdas in C++17. Fix #4565#4593

Merged
Skylion007 merged 4 commits into
pybind:masterfrom
Skylion007:skylion007/allow-noexcept-lambdas
Mar 28, 2023
Merged

bugfix: allow noexcept lambdas in C++17. Fix #4565#4593
Skylion007 merged 4 commits into
pybind:masterfrom
Skylion007:skylion007/allow-noexcept-lambdas

Conversation

@Skylion007

@Skylion007 Skylion007 commented Mar 27, 2023

Copy link
Copy Markdown
Collaborator

Description

Allows lambda specified to function defs to be noexcept(true) in C++17. This ended up being a rather quick fix compared to more general case which would require some extensive meta-templating to do this properly in C++17.

Suggested changelog entry:

* Allow lambda specified to function definition to be noexcept(true) in C++17

@Skylion007
Skylion007 force-pushed the skylion007/allow-noexcept-lambdas branch from 350f472 to bc62536 Compare March 27, 2023 16:54
@Skylion007
Skylion007 marked this pull request as ready for review March 27, 2023 17:39
@Skylion007 Skylion007 changed the title bugfix: allow noexcept lambdas in CPP17. Fix #4565 bugfix: allow noexcept lambdas in C++17. Fix #4565 Mar 27, 2023

@rwgk rwgk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

Comment thread tests/test_constants_and_functions.cpp Outdated
@Skylion007
Skylion007 merged commit 1e8b52a into pybind:master Mar 28, 2023
@Skylion007
Skylion007 deleted the skylion007/allow-noexcept-lambdas branch March 28, 2023 00:21
@github-actions github-actions Bot added the needs changelog Possibly needs a changelog entry label Mar 28, 2023
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label May 22, 2023
@Skylion007 Skylion007 linked an issue Feb 21, 2026 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Unable to Add Lambda with noexcept

2 participants