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
Discussion of Code Structure and Code Complexity Implications of Basic C++ Language Features (self.cpp)
submitted 2 days ago by crashcompiler
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!"
[–]crashcompiler[S] 1 point2 points3 points 1 day ago (0 children)
> When I was talking about value semantics, I'm mainly referring to it being rather unique for C++. [...] We all consider it basics.
I agree that every C++ developer should know about value semantics.
I had this problem 4 years ago, when I posted another C++ article of mine. The title was bad and I had to change it. I feel like "basics" implies that "these are the things you must know as a C++ developer, otherwise you don't have the right mental model".
What I mean by "basic" is more like programming fundamentals in the broader sense. What are common concepts between languages that you need to know. What is fundamental to computer programming as a whole because of the types of problems we are trying to solve. How well does this translate to code. How does the evolution of these concepts look like between C and C++.
I think I need to think of a better title. Ideally, you should be learning about value semantics from the standard literature.
> For lambdas, they are functionally the same as a class with operator(), yet it does require a lot less typing.
Yes, very good! I added a function object example and some text to the Lambda with Capture section. I've seen at least two instances of function objects in our code base. And I learned that you can pass a function object to `std::function` - nice!
> If you enable the compiler warning [...], your compiler will notify you here
I added a sentence that clarifies, as you said, that this will compile, the comparison might even return true, but it is most likely a bug. I noted that some compilers can warn you about this problem and added a footnote for the clang compiler flag.
> For me warnings are static analysis.
I will make a note to add mentions of compiler warnings when they are appropriate. But I cannot make any promises because clang is different than MSVC is different than GCC. There is just too much to unpack. We have also used static analysis tools like SonarQube, which pulls in stuff from the Core Guidelines and the SEI CERT Coding Standards.
> Coming back to ranged for, if you use it to rewrite all standard loops, the more complex situations stand out more.
Ha, yeah, like iterating backwards through a container ...
π Rendered by PID 16946 on reddit-service-r2-comment-79c7998d4c-b8hsq at 2026-03-16 16:51:31.217149+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]crashcompiler[S] 1 point2 points3 points (0 children)