Skip to content

Apply #3782 to all MSVC version#4357

Merged
scoder merged 1 commit intocython:masterfrom
maxbachmann:patch-6
Oct 28, 2021
Merged

Apply #3782 to all MSVC version#4357
scoder merged 1 commit intocython:masterfrom
maxbachmann:patch-6

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.

3 participants