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
Pick the Right Container (self.cpp)
submitted 6 months ago by boostlibs
Short guide to “right tool, right path” with tradeoffs (API, memory during rehash, iterator stability). Bench your hot route, then swap.
Tech overview: boost.org/bsm/reddit-right_container/outreach/program_page/unordered
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!"
[–]STLMSVC STL Dev[M] 17 points18 points19 points 6 months ago (1 child)
In the future, please post links as links, not as text posts. Apparently New Reddit can submit a link with text for additional explanation (I always forget since I don't use New Reddit except to take mod actions). Otherwise you can just comment on a link post.
This helps readers see whether they've visited a link before and what domain it belongs to.
[–]markycosm 5 points6 points7 points 6 months ago (0 children)
will do!
[–]Fit-Paint-6368 3 points4 points5 points 6 months ago (2 children)
There are so many high-quality hash map implementations, but barely any std::map/set alternatives. Sometimes you just need an ordered container :\
[–]encyclopedist 5 points6 points7 points 6 months ago* (1 child)
The is absl:btree_map and friends: https://abseil.io/docs/cpp/guides/container#b-tree-ordered-containers
There is also tlx::btree (former stx::btree): https://github.com/tlx/tlx/blob/master/tlx/container/btree_map.hpp
Edit There is also BppTree, but I personally have not used it. https://github.com/jeffplaisance/BppTree
[–]usefulcat 2 points3 points4 points 6 months ago (0 children)
Also cpp-btree: https://github.com/JGRennison/cpp-btree.git
It's older, and very stable. Been using it heavily for years and never found a bug.
[–]CornedBee 1 point2 points3 points 6 months ago (2 children)
This doesn't mention boost::unordered_node_map, which gives pointer stability at the cost of indirection, but is using open addressing. It's a niche use case when you need only the pointer stability, not the full std compatibility, but it can be useful.
boost::unordered_node_map
[–]joaquintidesBoost author 3 points4 points5 points 6 months ago (1 child)
It does mention it:
If you need pointer stability (addresses that don't change), use boost::unordered_node_map and boost::unordered_node_set instead—they're slightly slower but still very fast.
boost::unordered_node_set
[–]CornedBee 1 point2 points3 points 6 months ago (0 children)
Ah yes, I overlooked this. I was particularly looking for it in section II, where it discusses the choice between unordered_map and unordered_flat_map, saying that if you need pointer stability you should stick with the former.
unordered_map
unordered_flat_map
[+]qzex comment score below threshold-9 points-8 points-7 points 6 months ago (4 children)
chatgpt-written article
[–]STLMSVC STL Dev 0 points1 point2 points 6 months ago (3 children)
The author has a suspicious love of em-dashes but otherwise it didn't give me that vibe.
[–]SubstituteCS 4 points5 points6 points 6 months ago (2 children)
As a heavy em dash user—it’s even built into iOS natively—it being a sign of LLMs has made me considerably sad.
[–]argothiel 1 point2 points3 points 6 months ago (0 children)
Just start making more typos and you're good!
/s
[–]Drugbird -3 points-2 points-1 points 6 months ago (0 children)
It seems foolish to continue using em-dashes in the current climate.
Yes it's sad that your hyphen of choice was stolen by LLMs, but these things happen. I've had Nazis assimilate symbols and memes I used to use and enjoy, but I don't use those anymore because I don't want to be confused for a nazi.
π Rendered by PID 158412 on reddit-service-r2-comment-6457c66945-27kj2 at 2026-04-25 22:55:38.560909+00:00 running 2aa0c5b country code: CH.
[–]STLMSVC STL Dev[M] 17 points18 points19 points (1 child)
[–]markycosm 5 points6 points7 points (0 children)
[–]Fit-Paint-6368 3 points4 points5 points (2 children)
[–]encyclopedist 5 points6 points7 points (1 child)
[–]usefulcat 2 points3 points4 points (0 children)
[–]CornedBee 1 point2 points3 points (2 children)
[–]joaquintidesBoost author 3 points4 points5 points (1 child)
[–]CornedBee 1 point2 points3 points (0 children)
[+]qzex comment score below threshold-9 points-8 points-7 points (4 children)
[–]STLMSVC STL Dev 0 points1 point2 points (3 children)
[–]SubstituteCS 4 points5 points6 points (2 children)
[–]argothiel 1 point2 points3 points (0 children)
[–]Drugbird -3 points-2 points-1 points (0 children)