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

Compiling internal_math.hpp failed in some Visual Studio #3

Closed
yosupo06 opened this issue Sep 8, 2020 · 1 comment
Closed

Compiling internal_math.hpp failed in some Visual Studio #3

yosupo06 opened this issue Sep 8, 2020 · 1 comment

Comments

@yosupo06
Copy link
Collaborator

yosupo06 commented Sep 8, 2020

Reporter: TumoiYorozu (Japanese tweet: https://twitter.com/TumoiYorozu/status/1303198406513291264 )

It seems that some Visual Studio failed to compile internal_math. We need to take a look into.

As a temporary solution, replacing

    for (long long a : {2, 7, 61}) {

into

    int v[] = { 2, 7, 61 };
    for (long long a : v) {

works, but we have to find the reason.

@yosupo06
Copy link
Collaborator Author

I got the reason.

In default, the project of Visual Studio enables the SDL check (/sdl).
However, we run MSVC from cmake & CLI, so don't enable this.

And somehow SDL check breaks above code (related?: https://stackoverflow.com/questions/42917099/constexpr-errors-vs2017-c-compiler-regression)

yosupo06 added a commit that referenced this issue Sep 11, 2020
fix #3: fix internal_math for msvc
yosupo06 added a commit that referenced this issue Sep 11, 2020
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

No branches or pull requests

1 participant