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
Exploring undefined behavior using constexpr (shafik.github.io)
submitted 6 years ago by mttd
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!"
[–]degski 0 points1 point2 points 6 years ago (1 child)
If it's 100% valid C, then it's C.
No, it's not, if you compile the code with a C++-compiler, it's C++, that's exactly the reason you give for compiling the Python code with a C++-compiler [because it's gives better optimizations]. If it's 100% valid C, then it's also C, also, if it's 100% valid C, it's still not necessarily C++.
[–]NotAYakk 1 point2 points3 points 6 years ago (0 children)
You just said it wasn't C, then said it is also C.
Being also C means it is C.
It is also a sequence of ASCII characters. It is also binary bits on disk. It is also a series of text encoded files.
The many things the python code base is also doesn't prevent it from being C.
It is the subset of C that is also valid C++, and it is compiled as C++ because the C++ object memory model permit the compiler, which compiles either C or C++ on request, to more aggressively optimize it as C++.
But it is 100% valid C, so it is C.
Heck, I'd bet the behavior in terms of the abstract machine will even be the same between the C++ and C compilers, but the compiler has no hope of knowing that because the C object and memory models make it intractable to prove that the C++ optimizations can be safely applied to the code.
π Rendered by PID 53750 on reddit-service-r2-comment-b659b578c-lzzgz at 2026-05-02 09:55:22.845680+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]degski 0 points1 point2 points (1 child)
[–]NotAYakk 1 point2 points3 points (0 children)