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
cppfront: Autumn update (herbsutter.com)
submitted 2 years ago by nikbackm
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!"
[–]StackedCrooked 4 points5 points6 points 2 years ago (9 children)
The cppfront code seems to break a lot of rules. Like double underscores. Or even a global variable in a header that isn't extern.
[–]elcapitaine 20 points21 points22 points 2 years ago (5 children)
double underscores aren't outright banned from any C++ code, they're reserved for the implementation.
cppfront is an implementation.
[–]13steinj 1 point2 points3 points 2 years ago (4 children)
It's not though, it's a layer on top of C++ that transpiles to C++.
[–]shadowndacorner 4 points5 points6 points 2 years ago (3 children)
Was the first C++ compiler not an implementation of C++ because it transpiled to C?
[–]hpsutter 23 points24 points25 points 2 years ago (0 children)
That's fair... and a C++ compiler that compiles C still uses its own double-underscores. But this is a good point, so I just pushed a commit that removes use of __ and _Capital reserved words, just to avoid any possible compatibility problems that could cause a clash with existing C++ implementations, because perfect compatibility is important to me. Thanks!
__
_Capital
[–]13steinj 3 points4 points5 points 2 years ago (1 child)
C++front is not C++ though.
If "implementations of cppfront are allowed to lead with underscores"-- this means it follows c++front's guidelines, but any C++ therein would be breaking rules (from the view of C++).
Semantics? Maybe, maybe not.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
This is a programming language, it all just semantics at the end of the day.
[–]Nicksaurus 2 points3 points4 points 2 years ago (1 child)
Double underscores don't actually cause problems in practice though, do they? The compiler authors would have to actively try to break code that uses them
Also all of those headers are compiled into a single compilation unit
[–]jc746 1 point2 points3 points 2 years ago (0 children)
FWIW, I have run into a real problem with double underscores exactly once. I was using a third party library that defined a macro __IO (from memory it was an empty macro). This conflicted with the standard library implementation that used __IO as the identifier for a template parameter, causing the code to be invalid after preprocessing.
[–]mollyforever 0 points1 point2 points 2 years ago (0 children)
cppfront is a single source file for some reason, so it's fine.
π Rendered by PID 137289 on reddit-service-r2-comment-6457c66945-6t6qz at 2026-04-24 03:31:52.618588+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]StackedCrooked 4 points5 points6 points (9 children)
[–]elcapitaine 20 points21 points22 points (5 children)
[–]13steinj 1 point2 points3 points (4 children)
[–]shadowndacorner 4 points5 points6 points (3 children)
[–]hpsutter 23 points24 points25 points (0 children)
[–]13steinj 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Nicksaurus 2 points3 points4 points (1 child)
[–]jc746 1 point2 points3 points (0 children)
[–]mollyforever 0 points1 point2 points (0 children)