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

Compile error with MSVC in default settings #591

Open
limymy opened this issue Dec 25, 2023 · 3 comments
Open

Compile error with MSVC in default settings #591

limymy opened this issue Dec 25, 2023 · 3 comments

Comments

@limymy
Copy link

limymy commented Dec 25, 2023

I am using this library for the first time. I'm attempting to integrate it into my project using CMake FetchContent. When compiling on Windows, I consistently encounter the error C2370. After consulting the CI logs, I found that the error occurs when using C++17, but it compiles successfully with C++20. As a workaround, I changed the C++ version in the code to cxx_std_20, and it worked fine.

target_compile_features(unifex PUBLIC cxx_std_17)

Could you please address the compilation error when using C++17, or consider setting the default C++ version to C++20 when using MSVC?

@janondrusek
Copy link
Contributor

We are not using unifex and MSVC internally in C++17 mode, therefore fixing the errors you noticed wasn't a priority.

PR to address this issue is always welcome.

@limymy
Copy link
Author

limymy commented Dec 27, 2023

Thanks for your response. I'm also not using unifex in MSVC C++17, so could we consider raising the C++ standard to C++20 when detecting the use of MSVC?

@MasterDrake
Copy link

So it's not just me then, a shame :(
Out of 108 projects, only 60 actually built. The others require, as you said, c++20.
Thanks for opening this issue

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

3 participants