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

Update signature of make_unique #5569

Merged
merged 2 commits into from Jul 31, 2023
Merged

Update signature of make_unique #5569

merged 2 commits into from Jul 31, 2023

Conversation

da-woods
Copy link
Contributor

Also tweak the selection for move-if-supported. This now lets the user enable it by a define even if the compiler support isn't detected. This is useful because the new signature for make_unique kind of relies on move-if-supported to work.

Fixes #5560

Also tweak the selection for move-if-supported. This now lets
the user enable it by a define even if the compiler support isn't
detected. This is useful because the new signature for
make_unique kind of relies on move-if-supported to work.

Fixes cython#5560
Comment on lines 65 to 64
// move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
#if CYTHON_USE_CPP11_FEATURES
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing the comment, does _MSC_VER >= 1600 really imply the support for "C++11 features" in general, or just std::move? It seems that std::move is the only C++11 feature that we use internally, so why not call the feature flag CYTHON_USE_CPP_MOVE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done that - c++11 support looks to be slowly implemented across multiple MSVC versions (of course this is probably true for every compiler...).

(I think we do use C++11 lambdas in one place, But we only do it if the user uses c++11 enums, so that doesn't really need a guard).

@scoder scoder added this to the 3.0.1 milestone Jul 31, 2023
@scoder scoder merged commit 365ba8e into cython:master Jul 31, 2023
73 of 75 checks passed
@scoder scoder added the defect label Jul 31, 2023
@da-woods da-woods deleted the make_unique branch July 31, 2023 10:34
@wence-
Copy link

wence- commented Jul 31, 2023

Thanks for the quick fix!

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] make_unique not annotated with except +
3 participants