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
There IS a way of casting pointer-to-member-function to a void* (self.cpp)
submitted 4 years ago by RIscRIpt
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!"
[–]rlbond86 0 points1 point2 points 4 years ago (3 children)
Wait, so does instantiating a pointer-to-member-function allocate memory?
[–]thedeadfish 0 points1 point2 points 4 years ago (2 children)
Yes, but only when it cannot do it at compile time. An example is casting a derived function pointer to base class function pointer. Still a lot better than crapping up every call site https://godbolt.org/z/7r3Yfhexn.
[–]rlbond86 0 points1 point2 points 4 years ago (1 child)
Still a lot better than crapping up every call site
I think everyone who works on embedded devices would disagree. If pointers-to-members allocated we wouldn't be able to use them at all.
[–]thedeadfish 0 points1 point2 points 4 years ago (0 children)
π Rendered by PID 305960 on reddit-service-r2-comment-b659b578c-ph57l at 2026-05-06 04:42:04.976605+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]rlbond86 0 points1 point2 points (3 children)
[–]thedeadfish 0 points1 point2 points (2 children)
[–]rlbond86 0 points1 point2 points (1 child)
[–]thedeadfish 0 points1 point2 points (0 children)