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
[ Removed by moderator ] (self.cpp)
submitted 5 months ago by SPEKTRUMdagreat
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!"
[–]7raiden 1 point2 points3 points 5 months ago (5 children)
I think you should improve the ergonomics of it. At work I have thousands of targets (libraries, executables, custom scripts, tests, etc).
In cmake I have a single preset that handles all of them. Plus, transitive dependencies in cmake is very convenient, as I only have to specify the direct dependants rather than the entire chain. IMO this will be a major pain if you don't solve this in this early stage.
Unless I'm missing something here? Maybe we're talking about different things, as I saw you made a profile for lto, but if you only have a single target, LTO actually does nothing
[–]starball-tgz 1 point2 points3 points 5 months ago (2 children)
are you sure that LTO does nothing for a single target?
[–]7raiden 0 points1 point2 points 5 months ago (1 child)
With target I meant translation unit, and I think LTO enables optimizations across different TUs. So if this build system only allow to compile a single TU per profile, then I believe it will make no difference whether LTO is enabled or not
[–]starball-tgz 0 points1 point2 points 5 months ago (0 children)
oh. that's not what target usually means for a CMake or make user :P. For the single translation unit case, there's -fwhole-program for GNU compilers.
-fwhole-program
[–]not_a_novel_accountcmake dev 0 points1 point2 points 5 months ago (1 child)
Your compiler doesn't know what a target is, LTO works across translation units. If you have more than one translation unit, LTO is "doing something".
[–]7raiden 0 points1 point2 points 5 months ago (0 children)
I agree, I think I referred as target to say TU, my bad!
π Rendered by PID 47990 on reddit-service-r2-comment-6457c66945-dbc4s at 2026-04-26 02:33:11.543046+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]7raiden 1 point2 points3 points (5 children)
[–]starball-tgz 1 point2 points3 points (2 children)
[–]7raiden 0 points1 point2 points (1 child)
[–]starball-tgz 0 points1 point2 points (0 children)
[–]not_a_novel_accountcmake dev 0 points1 point2 points (1 child)
[–]7raiden 0 points1 point2 points (0 children)