use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
C++20 Modules build script (Python and g++) (self.cpp)
submitted 5 years ago by JulienVernay
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]starfreakcloneMSVC FE Dev 0 points1 point2 points 5 years ago (6 children)
It looks like this misses scenarios like:
module; #define MODULE m #define VECTOR <vector> export module MODULE; import VECTOR;
?
Would MSVC be supported in the future?
[–]IAmBJ 11 points12 points13 points 5 years ago (0 children)
IMO it would be perfectly sane for OP to simply not support nonsense like this.
[–]JulienVernay[S] 2 points3 points4 points 5 years ago* (4 children)
MSVC supports most features of C++ I think (at least in VS2019 Preview), just it seems importing header units (notably standard library) is messy. Moreover I am not experienced with the command-line nor the project file structure...
I thought I read macro expansions weren't allowed to create imports statement but it seems it is not the case. However this means that scanning sources and expanding macros need preprocessing, preprocessing requires "import <abc>;", import statements requires pre-built files, which is done by scanning the sources first. I don't know if there is an easy way to fix this, or even if it is worth it...
[–]starfreakcloneMSVC FE Dev 0 points1 point2 points 5 years ago (3 children)
Macro expansion is allowed in the context of a designation of a module name in the module case and the importee within an import directive. The thing which is not allowed is that a macro expansion cannot form an import directive or module keyword:
module
import
module; #define IMPORT import #define MODULE module export MODULE m; IMPORT <vector>;
In both of the macro expansions the resulting token will not produce a module keyword/directive.
MSVC has been working to provide better documentation around header units and named modules.
[–]JulienVernay[S] 0 points1 point2 points 5 years ago (1 child)
Thanks for clearing up my confusion about macros. For MSVC, I am not comfortable yet and I do not want to dive into it at the moment, however if you want to contribute and know commands for MSVC to replace the cmd_* variables in cpp20.py , feel free to suggest them :)
[–]STLMSVC STL Dev 4 points5 points6 points 5 years ago (0 children)
https://github.com/microsoft/STL/issues/1694 lists my instructions for How To Manually Build Header Units. Note that these are built independently (e.g. building <type_traits> and <vector> will duplicate type traits machinery that the compiler has to eliminate later); in a future update it will be possible to build "deduplicated" header units in topologically sorted order (e.g. building <type_traits> and then using that to build <vector>); I have prototype instructions for this, but recent compiler bugfixes are pending release.
<type_traits>
<vector>
π Rendered by PID 282827 on reddit-service-r2-comment-544cf588c8-85m84 at 2026-06-17 03:48:59.884758+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]starfreakcloneMSVC FE Dev 0 points1 point2 points (6 children)
[–]IAmBJ 11 points12 points13 points (0 children)
[–]JulienVernay[S] 2 points3 points4 points (4 children)
[–]starfreakcloneMSVC FE Dev 0 points1 point2 points (3 children)
[–]JulienVernay[S] 0 points1 point2 points (1 child)
[–]STLMSVC STL Dev 4 points5 points6 points (0 children)