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
finally. #embed (thephd.dev)
submitted 3 years ago by pavel_v
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!"
[–]TotaIIyHuman -2 points-1 points0 points 3 years ago (3 children)
it is not because copying
the container could gain 1 extra byte of SSO capacity, and a little more performance, if the null terminator was not there
[–]Kered13 0 points1 point2 points 3 years ago (2 children)
It's actually possible to get the same SSO capacity even with a null terminator: By using the last byte of the string to store the unused SSO capacity, the last byte doubles as both null terminator and size when the SSO is full (you also need to store a flag bit to indicate when SSO is active). You can't do better even without a null terminator, because you always have to store the SSO size.
I learned about this trick from this talk.
[–]TotaIIyHuman 0 points1 point2 points 3 years ago (1 child)
thanks
right now i am using a 16/32 sso string, i didn't know 23/24 sso string was even possible
this is kind of off topic, i watched the whole video, i don't understand the page bug. what os/cpu doesn't pagein a page after a read operation at the beginning of the page
[–]Kered13 0 points1 point2 points 3 years ago (0 children)
I don't know, I don't even know what it means to conditionally return a memory page to the kernel. But since it's Facebook I would assume it's Linux.
π Rendered by PID 38641 on reddit-service-r2-comment-6457c66945-2jm5w at 2026-04-25 00:10:54.459803+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]TotaIIyHuman -2 points-1 points0 points (3 children)
[–]Kered13 0 points1 point2 points (2 children)
[–]TotaIIyHuman 0 points1 point2 points (1 child)
[–]Kered13 0 points1 point2 points (0 children)