-
Notifications
You must be signed in to change notification settings - Fork 69
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
MSVC 19.x is not working #276
Comments
I just found a hint that msvc may contains a compiler bug for fold expression AND: https://stackoverflow.com/questions/56978499/compiler-error-with-a-fold-expression-in-enable-if-t |
@sunavlis Thanks for reporting! : - ) This example works on the latest MSVC on Compiler Explorer: https://godbolt.org/z/vxT3vKr6x , when I use Are you able to build with C++20 or later, or do you actually need C++17 to work for now? |
@mhoemmen thanks for your answer. Unfortunately it is true, that our project uses C++17. And at the moment it's not planed to migrate to a newer version of C++. I did a few changes in the sources and used |
@sunavlis Thanks for working on a fix!
Is the issue with the fold expression inside |
No the issue isn't in The issue is in the As soon as
For testing, I changed the |
Thanks for working on this! : - ) I've seen some suggestions to include extra parentheses around (and perhaps also inside) fold expressions. This week is the C++ Standard Committee plenary meeting, but we should have some more time to look at this in a few days. |
Thanks for your reply. In the meantime I found additional interesting facts: I focused on the differences in MSVC when building with C++17 ( In C++20 the flag is set to Changes are here: I think it would be nice to have source code which works with many compilers and flags as possible, but with this pragmatic change the library could be used with MSVC with really small changes in the library it self. What do you think? I could create a merge request to push the changes back into the stable branch. |
Yeah we could add that flag, but I also can check if I find another workaround. I am coming back from two weeks of travel including ISO C++ committee today, and might be able to look a bit more into this. That said I am generally all for "make your compiler behave in a standard compliant way" lol |
The mdspan library doesn't compile when using it in Visual Studio 2022 and MSVC 19.35.
With the following cMake and example source results in a compilation error:
CMakeLists.txt.
main.cpp
Error
Or here in the online demo: https://godbolt.org/z/W9bhGxzqf
Any idea where the error is from? And how it can be fixed?
Thanks,
Silvan
The text was updated successfully, but these errors were encountered: