-
Notifications
You must be signed in to change notification settings - Fork 260
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
[SUGGESTION] Start using import std;
in cpp2util.h
with MSVC and re-enable -import-std
in CI builds
#950
Comments
I was thinking the same. Note that this will require:
I can go ahead and make all these changes in one commit, including checking in my |
Apologies in advance that checking in the If that causes issues and I should remove them again, please speak up and let me know! |
See the discussion at 3b78cf1#commitcomment-112286068. |
See #950 comment thread at #950 (comment)
Nice work @hsutter One thing I noticed is that it’s not necessary to (Shame about the name because it doesn’t seem to suggest that; something like |
Thanks! STL (the person) just mentioned that too. I've removed |
Now that MSVC (with
/std:c++latest
) supportsimport std;
it's possible to remove the Microsoft-only experimentalimport std.core;
etc lines fromcpp2util.h
and replace them withimport std;
orimport std.compat;
.As described in #943, the
import std.core;
code was not working in the GitHub-hosted CI runner, so the MSVC regression tests have been updated to run cppfront with-include-std
to#include
headers instead of importing any modules.I experimented with
import std;
and GitHub-hosted runners and documented two methods to get them building correctly:msbuild
for a Visual Studio solutioncl.exe
in a shell, which is applicable for cppfront's GitHub CI workflowhttps://github.com/bluetarpmedia/msvc-import-std-github
So this suggestion involves 2 changes:
cpp2util.h
to useimport std;
(where available)-import-std
behaviour, and modify the MSVC build job to compileimport std;
modules support first before then compiling the tests (more info in mymsvc-import-std-github
repo)The text was updated successfully, but these errors were encountered: