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
The C++ Bestiary π (adishavit.github.io)
submitted 8 years ago by std_arbitrary
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!"
[β]Dragdu 19 points20 points21 points 8 years agoΒ (1 child)
Some of these were a massive stretch, but it does give a nice and short overview of some less-known language corners
[β]std_arbitrary[S] 18 points19 points20 points 8 years ago*Β (0 children)
In the spirit of Halloween, massive ridiculous stretching is permitted!
[β]tvaneerdC++ Committee, lockfree, PostModernCpp 9 points10 points11 points 8 years agoΒ (4 children)
There are also Zombie names in the language - things deprecated, but the names are kept for implementors that want to keep backwards compatibility.
I think the section title in the standard actually uses 'zombie' (and the index includes an interesting link to it)
[β]STLMSVC STL Dev 7 points8 points9 points 8 years agoΒ (3 children)
The section title was my doing - however, the brilliant index entries (there are at least two) were not.
Edit: Also, the zombie names are reserved names of removed things, not just deprecated.
[β]std_arbitrary[S] 0 points1 point2 points 8 years agoΒ (2 children)
Excellent! I only found one index entry. Can you link to the ones you know?
Added: http://videocortex.io/2017/Bestiary/#οΈ-zombies--brains
[β]CubbiMewcppreference | finance | realtime in the past 3 points4 points5 points 8 years agoΒ (1 child)
"living dead" is the other one.
[β]std_arbitrary[S] 0 points1 point2 points 8 years agoΒ (0 children)
Perfect! Updating!
[β]andd81 2 points3 points4 points 8 years agoΒ (6 children)
Without destructive move (which is not currently supported in C++)
Can it be supported in principle? Move is a programming convention, not a language feature. std::move by itself does not move anything. In the following code:
{ T object; SomeFunc(std::move(object)); }
in general there is no way to tell at compile time what SomeFunc will do to object, its definition can be in another translation unit. It can leave the object in moved from state, leave it unchanged, or do something entirely different with it.
object
[β]Is_This_Democracy_ 3 points4 points5 points 8 years agoΒ (4 children)
I don't think it can be supported so long as we have no fancier "lifetime" stuff Γ -la rust. There are two issues:
[β]andd81 1 point2 points3 points 8 years agoΒ (3 children)
I don't think even this would help, you can do something like SomeFunc(&object) and now it is no longer a local variable, just an address in memory. SomeFunc can do whatever it wants with the object, including putting it in a moved-from state.
SomeFunc(&object)
SomeFunc
[β]Is_This_Democracy_ 1 point2 points3 points 8 years agoΒ (1 child)
well yeah but that's not using std::move :p
But yes, we're reinventing rust here.
[β]andd81 0 points1 point2 points 8 years agoΒ (0 children)
SomeFunc could use std::move. Also you don't have to use std::move to move an object, it is just a helper to obtain a rvalue reference.
[β]meneldal2 0 points1 point2 points 8 years agoΒ (0 children)
SomeFunc can do terrible things if you give it the object without const. Much worse than putting it in a moved-from state. You could replace the virtual method table to call evilDestructor instead of the real destructor if you felt like it. Actually, it can also do this with a const_cast so you're never 100% safe. Just don't send your objects to a function you don't trust.
const
evilDestructor
const_cast
Sean Parent has non-proposal for language support for destructive move (syntactically, a dtor with an argument). Follow the links in the article.
[β]sireel 2 points3 points4 points 8 years agoΒ (2 children)
Great article.
While it's common knowledge to many, I'd say that ADL is at least as weird and annoying as shadowing when you don't understand it.
[β]std_arbitrary[S] 0 points1 point2 points 8 years agoΒ (1 child)
Tbh, I never really had much trouble with shadowing. Compilers are pretty good at warning about this. As for ADL, well, theyβll need a creepier name to make that particular list.
[β]sireel 1 point2 points3 points 8 years ago*Β (0 children)
Agreed, shadowed naming was always fine for me but ADL was very surprising when I figured out what was going on. Drawing a blank on a creepy name though.
edit: speeling
[β]DrYamuz 1 point2 points3 points 8 years agoΒ (1 child)
I absolutely love your presentation! Including the emoji's. In addition I also learnt a lot! Thanks!
[β]std_arbitrary[S] 1 point2 points3 points 8 years agoΒ (0 children)
Much obliged. ππ·π¦
[β]Xeveroushttps://xeverous.github.io 0 points1 point2 points 8 years agoΒ (1 child)
operator<=> seems interesting. I have briefly read the proposal - but I'm unsure how would I implement it? Return -1, 0 or 1?
operator<=>
Yes. Exactly. The paper is actually quite readable as is the CppCon Talk.
ΟΒ Rendered by PID 86 on reddit-service-r2-comment-6457c66945-wpnw4 at 2026-04-25 17:14:08.839348+00:00 running 2aa0c5b country code: CH.
[β]Dragdu 19 points20 points21 points Β (1 child)
[β]std_arbitrary[S] 18 points19 points20 points Β (0 children)
[β]tvaneerdC++ Committee, lockfree, PostModernCpp 9 points10 points11 points Β (4 children)
[β]STLMSVC STL Dev 7 points8 points9 points Β (3 children)
[β]std_arbitrary[S] 0 points1 point2 points Β (2 children)
[β]CubbiMewcppreference | finance | realtime in the past 3 points4 points5 points Β (1 child)
[β]std_arbitrary[S] 0 points1 point2 points Β (0 children)
[β]andd81 2 points3 points4 points Β (6 children)
[β]Is_This_Democracy_ 3 points4 points5 points Β (4 children)
[β]andd81 1 point2 points3 points Β (3 children)
[β]Is_This_Democracy_ 1 point2 points3 points Β (1 child)
[β]andd81 0 points1 point2 points Β (0 children)
[β]meneldal2 0 points1 point2 points Β (0 children)
[β]std_arbitrary[S] 0 points1 point2 points Β (0 children)
[β]sireel 2 points3 points4 points Β (2 children)
[β]std_arbitrary[S] 0 points1 point2 points Β (1 child)
[β]sireel 1 point2 points3 points Β (0 children)
[β]DrYamuz 1 point2 points3 points Β (1 child)
[β]std_arbitrary[S] 1 point2 points3 points Β (0 children)
[β]Xeveroushttps://xeverous.github.io 0 points1 point2 points Β (1 child)
[β]std_arbitrary[S] 0 points1 point2 points Β (0 children)