hacking C++ (@hackingcpp) header
hacking C++ (@hackingcpp) profile picture

Learn contemporary C++ with code examples, concise explanations, cheat sheets and infographics. #cpp #cplusplus #programming #learning #education

Germany
Joined March 2020
Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)Photo by hacking C++ (@hackingcpp)
C++ Standard Library Algorithms Quick Visual Reference Part 1/32 - Sorted Range Operations #cpp #cplusplus #algorithms #programming #cheatsheet
11
129
7
373
hacking C++ retweeted
How do you create your C++ code today?
27%Code is written by myself
27%Some code is AI generated
26%Most code is AI generated
19%I only review AI output
118 votes • 2 days
1
2
6
1,382
I friggin' love std::variant. I just wish there was a cleaner way to visit. For example, if all variants have a .Foo() I want to my_variant.Foo();
7
32
4,509
That is why I made my post. See how lines 15-23 have 2 overloads (int and double)? Imagine if both of those lambdas looked the same: arg.Foo(); Now imagine if you had 8 overloads and they all looked like that. It feels silly and wasteful.
1
242
I see what you mean. But then you could just do this, right?
58
hacking C++ retweeted
Ladybird is now in alpha 🐞 Downloads for macOS and Linux available on our website. ladybird.org/posts/alpha/
412
1,231
415
9,924
1,036,533
Just keep on doing what you’ve been doing. Make flea even more awesome for all of us.
7
221
Flea 0.4.1 is out! 💨💧 - AirDrop plugin, off by default - Properties, Permissions on by default - Relative Path in Copy As - Nearby hosts on Network's + - Open folders in place with > and <
33
20
6
351
16,960
Amazing progress! If you keep up that pace, flea will surpass every other file manager on every metric by the end of the year.
1
195
Renaming a pile of files in Flea is now a single edit. Change every selected name at once, in the card or in your terminal editor. Swaps just work, bad lines are caught before anything moves, and one undo puts it all back. Thanks muellan for #183!
9
3
92
1,433
You know that if you keep implementing all my suggestions within days I'll take that as encouragement to push for even more😉 Keep up the great work!
1
1
115
hacking C++ retweeted
C++26 pack indexing lets you grab the Nth type from a pack without recursion. no more std::tuple trickery.
13
18
2
195
13,772
If you are using Neovim to write/review C or C++ this plugin could be really handy: github.com/J-Cowsert/classla… Just hover over a type or variable, press a key and see exactly how Clang lays it out in memory: offsets, padding, alignment etc. in a floating window.
8
837
hacking C++ retweeted
The Pimpl pattern: heap allocate your implementation, write a copy constructor, write a move constructor, write a destructor, write copy assignment, write move assignment C++26: std::indirect<Impl> impl_; Done. The compiler generates everything 🧵👇
5
3
2
76
14,267
C++ is not having a great day today
63
19
8
918
105,156
Unfortunately. If the rank is less than the rank of int, there’s a promotion to either int or unsigned int. It’s a real mess.
1
26
This is Algebrica. A mathematical knowledge base I’ve been building for 2.5 years. 215+ entries, carefully written and structured. 400k+ views over this time. Not much in absolute terms, but meaningful to me. No ads. No courses to sell. No gamification. No distractions. Just essential pages, aiming to explain mathematics as clearly as possible, for a university-level audience. Built simply for the pleasure of sharing knowledge. Content licensed under Creative Commons (BY-NC). Best experienced on desktop. If it helps even a few people understand something better, it’s worth it.
179
766
57
5,352
232,289
I've begun to work on the site again. - the default compiler for all runnable examples is now set to g++ 15.2 - the VIM Plugins page has been updated - added some sprinkles of std::print to the Beginner's Guide hackingcpp.com/news/2026-02-…
28
1,328
hacking C++ retweeted
Jjust did a round of updates to my starter project. Including automatic build and deployment of your project to github pages with a CI emscripten build! * emscripten * CI OS / Compiler updates * Fine tuning of static analysis github.com/cpp-best-practice… cpp-best-practices.github.io…
3
17
1
110
6,976
hacking C++ retweeted
I'm getting very close to publication of my latest book: The Programming Puzzles Big Book (Fun for ages 7-99)! leanpub.com/programming_puzz… This is your last chance to get it for the pre-release price of only $4.99 and help me find any remaining bugs. This is 400 pages of puzzles!
3
24
110
4,936
🎉 Big news! CLion is now free for non-commercial use! Whether you're a student, hobbyist, open-source hero, or just in love with C or C++, you can now code your heart out – for free! jb.gg/cl_free_x #cpp #cplusplus
27
221
59
1,250
129,274
Posted a new video about std::chrono which provides an overview of what functionality was added in C++11, C++17, and C++20. Watch to find out how much of chrono your compiler supports. We were pretty surprised at what we discovered. #cplusplus youtube.com/watch?v=63GKRVb8…
5
16
3,132
What main learning curve do you remember in your journey to programming? For me it was "functions" when moving from C64 BASIC to QBasic. Next was "how to correctly iterate over a std::list" in C++98
43
5
38
23,399
functions pointers classes/objects (encapsulation+invariants) inheritance+OO patterns STL design philosophy monads other functional patterns Pretty much in that order. Each of these concepts unlocked a new way of thinking for me.
4
1,016
For those interested, I made a graphical overview sheet of the range views a while back:
New cheat sheet and overview article of the “range views” in the C++20 and C++23 standard library. Article: hackingcpp.com/cpp/std/range… More cheat sheets: hackingcpp.com/cpp/cheat_she… #cpp #cplusplus #cpp20 #cpp23 #programming #coding #CheatSheet
1
21
1,930