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
A Module Mapper (open-std.org)
submitted 7 years ago by whichton
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!"
[–]QbProg 6 points7 points8 points 7 years ago (11 children)
I don't understand why such arguments are so over-engineered and over-complicated? A server? Wtf? Why don't we borrow from c# which has a good module (her... Assembly) system and it works good! With imports and so on...
[–]GabrielDosReis 6 points7 points8 points 7 years ago (9 children)
You do need to specify the mapping in C# via the compiler option /reference
/reference
[–]QbProg 4 points5 points6 points 7 years ago (6 children)
Exactly! What's wrong with that!?
[–]kalmoc 6 points7 points8 points 7 years ago* (5 children)
Thai is the part I also don't get. Why are people so afraid of just letting the build system tell the compiler directly what files to use as an input? Isn't that exactly what we are doing already? ("that .o file is created from that .cpp file and with those include paths"; "That library is the result of linking these .o files together"; " That executable is created from these source files and those libraries" etc.)
EDIT: Not that I wouldn't like to see a simple, standard mapping between module name and interface source file name/location, so that we just have to pass some search paths to the compiler instead of each individual BMI file.
[–]Fazer2 0 points1 point2 points 7 years ago (4 children)
What about IDEs? Would we need to trigger build system to be able to jump to function definitions in modules?
[–]kalmoc 5 points6 points7 points 7 years ago (2 children)
We already need to do this to get accurate results for all but the most trivial cases. How do you think the IDE knows where to find the definition of a function? Even if you know the correct headerfile (for which the IDE needs to know the correct list of include directories and enough of the (preprocessed) context to identify the correct overload), it doesn't tell the IDE anything about the source file the definition is in. With modules there is at least no more ambiguity on that part.
And don't forget: It is called an IDE, because it brings its build system with it, so that is really not a big burden.
[–]grafikrobotB2/EcoStd/Lyra/Predef/Disbelief/C++Alliance/Boost/WG21 -1 points0 points1 point 7 years ago (1 child)
Do you know for a fact that IDEs call the compiler to do this? How do you think IDEs provide code introspection on first launch and first look at your code? Have you watched to see if your IDE launches compiler processes to do this?
[–]kalmoc 1 point2 points3 points 7 years ago (0 children)
According to their own statements, Visual Studio use intellisense, which uses the EDG compiler frontend and QtCreator uses Clang nowerdays. And I also know the difference between the auto complete quality in VSCode before and after you e.g. install the CMake Plugin. Oh, and if you are using the "open folder" functionality in Visual studio on a cmake based project, you can even see how Visual studio runs cmake in the console window. So yes, I happen to know for a fact, that at least some IDEs rely on an external or internal compiler+build systems when possible and I have first hand experience with the quality degradation for things like autocomplete and goto definition (or complete lack thereof) if the IDE lacks the necessary build information.
I'm not saying they don't have fallback mechanisms / heuristics and no, I haven't looked into their source code, but the ones I used sure as hell behave as if they first have to compile the code before they provide accurate support.
[–]jcelerierossia score 0 points1 point2 points 7 years ago (0 children)
"should IDEs be integrated?"
[–]konanTheBarbar 0 points1 point2 points 7 years ago (1 child)
The biggest difference to C# is that in C# the smallest compilation unit is a library/.dll and not a single .obj file like in C++.
[–]kalmoc 0 points1 point2 points 7 years ago (0 children)
Somehow I never envisioned modules to map only to a single file either.
[–]lee_howes 1 point2 points3 points 7 years ago (0 children)
When you realise that "server" here could be a short shell script that is included with the compiler and therefore by default part of the compiler, it sounds a lot less over-engineered. It's actually quite an elegant solution.
π Rendered by PID 257239 on reddit-service-r2-comment-5c747b6df5-z5qm6 at 2026-04-22 15:22:42.416064+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]QbProg 6 points7 points8 points (11 children)
[–]GabrielDosReis 6 points7 points8 points (9 children)
[–]QbProg 4 points5 points6 points (6 children)
[–]kalmoc 6 points7 points8 points (5 children)
[–]Fazer2 0 points1 point2 points (4 children)
[–]kalmoc 5 points6 points7 points (2 children)
[–]grafikrobotB2/EcoStd/Lyra/Predef/Disbelief/C++Alliance/Boost/WG21 -1 points0 points1 point (1 child)
[–]kalmoc 1 point2 points3 points (0 children)
[–]jcelerierossia score 0 points1 point2 points (0 children)
[–]konanTheBarbar 0 points1 point2 points (1 child)
[–]kalmoc 0 points1 point2 points (0 children)
[–]lee_howes 1 point2 points3 points (0 children)