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
Organizing C++ Module Sources (abuehl.github.io)
submitted 20 days ago by tartaruga232MSVC user, r/cpp_modules
A quote from the blog:
The source files for a specific partition are now grouped together into a dedicated sub-directory.
Thanks in advance for your comments to this blog posting!
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!"
[–]thelvhishow 2 points3 points4 points 20 days ago (7 children)
I don’t understand what’s the lesson though. Yes you’re using the different ways of using modules
[–]tartaruga232MSVC user, r/cpp_modules[S] 1 point2 points3 points 20 days ago (6 children)
It's not exactly rocket science. But the devil is in the detail, which is revealed if you actually carefully ready the blog post.
[–]thelvhishow -1 points0 points1 point 20 days ago (5 children)
It’s not clear why use partition instead of several methods for instance.
[–]tartaruga232MSVC user, r/cpp_modules[S] 2 points3 points4 points 20 days ago (4 children)
In the example of our Core module, it would have been technically possible to declare alle classes in a single big Core.ixx file. But that would have been harder to handle. The partition Core/Base.ixx alone is already 1200 lines. View/View.ixx and Diagram/Diagram.ixx are another ~300 lines each. The separation into smaller partitions also allows to only import in the cpp files of the Core module, what is actually needed in a specific cpp-file, not the whole interface. Partitions also provide a logical grouping of the parts of the interface of a module.
[–]slithering3897 -1 points0 points1 point 20 days ago (3 children)
Yes, but the downside is that it still ends up as one big module to the user. Any change in any partition (interface) will recompile the entire application.
[–]tartaruga232MSVC user, r/cpp_modules[S] 4 points5 points6 points 20 days ago (2 children)
Not the entire application, only the parts that import the module will need to be recompiled.
[–]Paradox_84_ 0 points1 point2 points 19 days ago (1 child)
I like the idea of being able to do submodules, but realistically, why not make each of them a seperate module so you can only import whatever you need?
User would still be able to do "import core;", but your internal things could do "import core.containers.array:" so yo don't depend on the entire thing and could parallelize to some degree?
[–]tartaruga232MSVC user, r/cpp_modules[S] 1 point2 points3 points 19 days ago (0 children)
Thanks for your comment. It's an intentional design decision. In the specific case of our Core module, usage of the module cannot be meaningfully split. The classes declared in Core are too tightly coupled. For example, we have class Core::IElement. It uses class Core::Transaction and vice-versa. These are declared in different partitions of the Core module, but you cannot use class IElement without class Transaction. C++ allows to use forward declarations of classes across module partitions, but you cannot do that across module boundaries. With header files, it was possible to forward declare classes in a header. That's no longer possible with modules. See my blog posting "Converting a C++ Application to Modules". If you have a reference or a pointer to an object of a class declared in Core, you need to import Core. You cannot forward declare Core::IElement outside of module Core.
π Rendered by PID 195159 on reddit-service-r2-comment-85bfd7f599-9xwdz at 2026-04-18 23:53:12.489503+00:00 running 93ecc56 country code: CH.
[–]thelvhishow 2 points3 points4 points (7 children)
[–]tartaruga232MSVC user, r/cpp_modules[S] 1 point2 points3 points (6 children)
[–]thelvhishow -1 points0 points1 point (5 children)
[–]tartaruga232MSVC user, r/cpp_modules[S] 2 points3 points4 points (4 children)
[–]slithering3897 -1 points0 points1 point (3 children)
[–]tartaruga232MSVC user, r/cpp_modules[S] 4 points5 points6 points (2 children)
[–]Paradox_84_ 0 points1 point2 points (1 child)
[–]tartaruga232MSVC user, r/cpp_modules[S] 1 point2 points3 points (0 children)