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

Apply #3782 to all MSVC version #4357

Merged
merged 1 commit into from
Oct 28, 2021
Merged

Apply #3782 to all MSVC version #4357

merged 1 commit into from
Oct 28, 2021

Conversation

maxbachmann
Copy link
Contributor

This applies the fix from #3782 to all Python version, since it is not specific to Python3.4.
I assume it only occurs on some versions of MSVC. In my case the build:

@scoder @da-woods is there any reason why we should not completely drop the type specifier for enum classes?

@da-woods
Copy link
Contributor

da-woods commented Sep 1, 2021

is there any reason why we should not completely drop the type specifier for enum classes?

If I understand right it can sometimes be required if you have an enum class and something else with the same name then using the type specifier gets makes sure that you get the enum. It's a rare corner case but it seems worth keeping.

Therefore, I'd rather have a compiler version check if possible. It's a little tricky to pin down exactly when it was fixed but the internet suggests it was fixed in Visual Studio 2017. Therefore a version check of _MSC_VER >= 1910? We can nail it down tighter if needed later (if we find/receive better info)

I think it's right to base this on MSVC version rather than Python version (we started with Python version because 3.4 requires quite an old compiler)

@scoder scoder added this to the 3.0 milestone Oct 28, 2021
@scoder scoder merged commit db19667 into cython:master Oct 28, 2021
@scoder
Copy link
Contributor

scoder commented Oct 28, 2021

Thanks

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.

None yet

3 participants