Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type_caster for std::nullopt #350

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Add type_caster for std::nullopt #350

merged 1 commit into from
Nov 1, 2023

Conversation

zhqrbitee
Copy link
Contributor

Currently if any code uses std::nullopt, it will throw a bast_cast exception as no type_caster has been defined for it: #274.
As std::nullopt is a standard way to assign empty value to std::optional, so I think it is better to add the type_caster for it in stl/optional.h

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@wjakob wjakob merged commit 11c7297 into wjakob:master Nov 1, 2023
@wjakob
Copy link
Owner

wjakob commented Nov 1, 2023

Thanks!

wjakob pushed a commit that referenced this pull request Nov 1, 2023
Co-authored-by: Qingran Zheng <qingran_zheng@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants