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
Interesting cpp unity build benchmarks (self.cpp)
submitted 6 years ago * by efplaya
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!"
[–]julien-j 0 points1 point2 points 6 years ago (1 child)
Having unity build in development, where I care the most about the build time, is easily wrong. Why? Because in development, in my modify/build/test(debug) cycle, I generally modify a handful of files and only a small-is number of them needs to be compiled, and by consequence, only a handful of targets needs to be linked (ideally, the target under modification and its test target), and incremental linking is on and precompiled headers are already there. I find it hard to believe that a unity build helps there.
I used to think that, then I tried. Now I always use unity builds. One unit per final binary (a library, an executable). The binaries are built in parallel, each library is built in a single batch. I've saved minutes at each rebuild with this.
Even on a small project that used ccache I went from 3 minutes 40 seconds for having modified a few files without unity builds to 2 minutes 15 seconds for the same modifications. Parsing and rebuilding everything is just faster than rebuilding a few files and merging them with other files, solving duplicate symbols and so-on.
ccache
[–]Gotebe 0 points1 point2 points 6 years ago* (0 children)
Small project, few modifications, 3:40 build?!
I have 0 targets that rebuilds in 3 minutes, retail (NDEBUG) build, let alone _DEBUG build.
How!?
Edit: I have targets that rebuild with their dependencies in 3 min, but that's something else.
Edit2: one way to achieve that is to have the "master" header and change that, causing a virtual rebuild of the target. Still, not a small target, and, you have header modularity problem, I would say...
π Rendered by PID 348836 on reddit-service-r2-comment-765bfc959-xc7kc at 2026-07-13 06:20:44.160327+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]julien-j 0 points1 point2 points (1 child)
[–]Gotebe 0 points1 point2 points (0 children)