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

Fix compilation error with std::nullptr_t caster #840

Merged
merged 2 commits into from
May 9, 2017

Conversation

dean0x7d
Copy link
Member

@dean0x7d dean0x7d commented May 8, 2017

Fixes #839.

Note that void_caster::load() always returns false, even for None. This applies to std::nullptr_t and std::nullopt_t. Is there be a valid use case to make conversion from None work?

@wjakob
Copy link
Member

wjakob commented May 8, 2017

This looks good to me, assuming that it passes the CI tests :)

@dean0x7d
Copy link
Member Author

dean0x7d commented May 8, 2017

I enabled the None -> std::nullptr_t and None -> std::nullopt_t conversions to support std::variant<int, std::nullptr_t> from #839.

It doesn't seem to conflict with anything else. It does seem a bit weird, so I hope I'm not overlooking anything here.

@jagerman
Copy link
Member

jagerman commented May 9, 2017

LGTM.

@dean0x7d dean0x7d merged commit 78f1dcf into pybind:master May 9, 2017
@dean0x7d dean0x7d deleted the nullptr_t branch May 10, 2017 08:44
@dean0x7d dean0x7d modified the milestone: v2.2 Aug 13, 2017
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.

3 participants