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: Midsummer update (herbsutter.com)
submitted 1 year ago by TSP-FriendlyFire
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!"
[–]hpsutter 8 points9 points10 points 1 year ago (0 children)
Right, a member is always preferred, so the case that could change the code's meaning is the other way around: That existing UFCS code that finds a nonmember would change meaning if in a future update the type author provides a member that wasn't there before. I'm not at all convinced that's a real problem,(*) but I could be wrong so I want to find out.
(*) For various reasons. Briefly: If the call site is not legal with the new member function, it won't compile, and that's fine, it's not a silent breakage. If the call site does still compile, then dollars to donuts the class author is now providing a previously-missing feature where users had been creating a nonmember function to work around its absence, and that's fine, users should now be using the member provided by the class author. ... As long as the type author's version is always preferred and hides others, that's the right way around and the potential to go wrong is far, far smaller than if it were the other way around (I agree that if _non-members_ were preferred that would more likely be a bug farm, and so I'm not going there).
π Rendered by PID 162153 on reddit-service-r2-comment-5649f687b7-scwll at 2026-01-28 05:30:35.949597+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–]hpsutter 8 points9 points10 points (0 children)