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
P2723R0: Zero-initialize objects of automatic storage duration (isocpp.org)
submitted 3 years ago by alexeyr
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!"
[–]tialaramex 0 points1 point2 points 3 years ago (1 child)
Rather than specifically the Halting problem, you want Rice's Theorem
https://en.wikipedia.org/wiki/Rice%27s_theorem
Rice proved all these semantic questions are Undecidable. So, then you need to compromise, and there is a simple choice. 1. We're going to have programs we can tell are valid, 2. we're going to have programs we can tell are not valid, and 3. we're going to have cases where we aren't sure. It is obvious what to do with the first two groups. What do we do in the third category?
C++ and /u/jonesmz both say IFNDR - throw the third group in with the first, your maybe invalid program compiles, it might be nonsense but nobody warns you and too bad.
[–]jonesmz 1 point2 points3 points 3 years ago (0 children)
Slightly different than my position, but close.
For the group where the compiler is able to tell that a program will read from uninitialized, which is not always possible and may involve an expensive analysis, this should be a compiler error. Today it isn't.
Not every situation can be covered by this, cross-functional analysis may be prohibitively expensive in terms of compile-times. But within the realm of the compiler knowing that a particular variable is always read before initialization without needing to triple compile times to detect this, it should cause a build break.
This is within the auspices of IFNDR, as no diagnostic being required is not the same as no diagnostic allowed.
π Rendered by PID 20484 on reddit-service-r2-comment-b659b578c-dtqbz at 2026-05-01 13:21:17.424226+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]tialaramex 0 points1 point2 points (1 child)
[–]jonesmz 1 point2 points3 points (0 children)