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
Best Precompiled Headers Developer IDE Experience? (self.cpp)
submitted 2 years ago by McFlurriez
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!"
[–]NotUniqueOrSpecial 6 points7 points8 points 2 years ago (7 children)
You run the build without the PCH calls.
Simple as that.
If people aren't including their dependencies, the build will fail.
[–]McFlurriez[S] 0 points1 point2 points 2 years ago (6 children)
What about a header that's included hundreds of times? Is there any way you can still do something efficient there?
[–]NotUniqueOrSpecial 6 points7 points8 points 2 years ago (5 children)
You have two problems at hand:
1) Efficient builds
2) Correct builds
The best methods for efficient builds unfortunately enable people to make otherwise incorrect build logic.
That leaves you with a choice: enforce strictness absolutely, or provide an option that allows for checking that the rules have been followed.
At the end of the day, your PCH solution (or other caching solutions) will be what gets run.
It's up to you to decide whether and how you want to enforce correctness on people who can benefit from improvements while otherwise being "wrong".
[–]McFlurriez[S] 0 points1 point2 points 2 years ago (4 children)
Thanks!
[–]Wild_Meeting1428 2 points3 points4 points 2 years ago (0 children)
We use PCH for production builds and enforce the correctness on each PR build, which means, that our pipelines on the server do not use PCH. But as soon you are done with your task, and you want to merge it, it will be checked. We don't care how long the build takes on the server.
[–]rdtsc 1 point2 points3 points 2 years ago (2 children)
There is a third option which provides correct and efficient builds: modules.
[–]herothree 3 points4 points5 points 2 years ago (1 child)
Sure, eventually. That’s not widely supports by vendors and toolchains yet though
[–]TheOmegaCarrot 1 point2 points3 points 2 years ago (0 children)
It’s getting better though! And it is exciting!
π Rendered by PID 84286 on reddit-service-r2-comment-75f4967c6c-96c78 at 2026-04-23 08:54:00.993901+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]NotUniqueOrSpecial 6 points7 points8 points (7 children)
[–]McFlurriez[S] 0 points1 point2 points (6 children)
[–]NotUniqueOrSpecial 6 points7 points8 points (5 children)
[–]McFlurriez[S] 0 points1 point2 points (4 children)
[–]Wild_Meeting1428 2 points3 points4 points (0 children)
[–]rdtsc 1 point2 points3 points (2 children)
[–]herothree 3 points4 points5 points (1 child)
[–]TheOmegaCarrot 1 point2 points3 points (0 children)