-
Notifications
You must be signed in to change notification settings - Fork 113
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 internal compiler error with C++20 modules #858
Comments
I really want to support modules, but the compiler support is still suffering. I probably won't be able to debug MSVC module building of glaze for a while, but it is on my radar. |
I had been running into similar issues with the MSVC compiler as well when building a project based on C++ modules with the MSVC compiler through Visual Studio. With the latest preview version of Visual Studio (17.10 Preview 3), which I believe is bundled with version 19.40.33721.2 of MSVC, I am able to compile my project successfully if I put includes for glaze before the module export declaration like this:
However, if I use glaze functions in any template function, the compiler fails with the same internal compiler error mentioned at the start of this post, even if I am never actually passing any variables with that template type to the glaze functions. When this happens, I see another error in Visual Studio:
|
Thanks a lot for the update. I might try experimenting with MSVC modules support soon. It's curious that it's complaining about the tuple, I've been intending to simplify some of that code, which would hopefully help the compiler. |
From reading about current modules implementations it seems like compilers struggle with template specializations in the |
@stephenberry Please create a PR when module support works, so we can track it at https://arewemodulesyet.org/ https://github.com/kelteseth/arewemodulesyet :) |
I just merged in #961, which removes For those who test glaze with modules, please keep adding the issues you see here so that we can try to tackle them. |
Sorry to ask here @stephenberry but whats your experience with modules support in general? I'm thinking about adding Like a 3 step support level to arewemodulesyet table on the start page, because by the comments here, there can be issues even importing regular code into a modules project:
And my guess we will see only a real increase in compiler times if we are at least at step 3 or 5. |
Unfortunately, I still see the same compiler errors with the same test case detailed in my previous post with glaze 2.6.0
|
@SevenDayCandle, thanks for the update Could someone point me to a bleeding edge basic CMake project that supports C++20 modules? Or, throw one together for testing Glaze? I'd be happy testing on MSVC. |
I was able to get MSVC building (not with Glaze) with CMake and MSVC does not currently allow mixing This is currently a compile time bug in MSVC: import std;
#include <vector> This means that I have to use |
GH Actions Build error line: https://github.com/DatCaptainHorse/ChatNotifier/actions/runs/8380416839/job/22949592674#step:5:330
I love how glaze works out of the box and was easy to add, but on Windows (with modules atleast) MSVC screams.
Can be closed if there's nothing that can be done on your side 🙏
The text was updated successfully, but these errors were encountered: