We just published a new question! This one was contributed by GitHub user demercurizer. https://cppquiz.org/quiz/question/394
13.10.2025 07:50 β π 1 π 1 π¬ 0 π 0@knatten.bsky.social
I like C++, industrial music, and figuring out how computers work. Author of C++ Brain Teasers, http://blog.knatten.org, https://cppquiz.org and https://moduloone.com.
We just published a new question! This one was contributed by GitHub user demercurizer. https://cppquiz.org/quiz/question/394
13.10.2025 07:50 β π 1 π 1 π¬ 0 π 0Me pointing at slides in front of the crowd
A quiz question on a screen in front of the audience
The reMarkable team celebrating their victory
An overview of the audience
Some pictures from my C++ Quiz at @ndcconferences.com TechTown. Thanks to everyone who came, and congratulations to the reMarkable team who won with a very impressive score!
10.10.2025 08:44 β π 0 π 0 π¬ 0 π 0We just published a new user contributed question! https://cppquiz.org/quiz/question/393
06.10.2025 07:40 β π 2 π 1 π¬ 0 π 0We just published a new question! This one was contributed by Armen Aslanyan: https://cppquiz.org/quiz/question/391
29.09.2025 07:20 β π 1 π 2 π¬ 0 π 0My proposal to C++ Under The Sea was accepted, so I'll be visiting for the first time! I'll be talking about the two memory models (language and CPU). Looking forward to it! cppunderthesea.nl
28.09.2025 07:26 β π 8 π 0 π¬ 0 π 0Update, that worked! Ffmpeg 4.6 is now available: conan.io/center/recip...
28.09.2025 07:24 β π 1 π 0 π¬ 0 π 0You too!
21.09.2025 18:32 β π 1 π 0 π¬ 0 π 0Intentionally obscured tiny C++ program
On the π to @ndcconferences.com TechTown, eating candy and chuckling to myself at this question for the Wednesday evening C++ pub quiz. What's the question? You'll have to wait and see...
21.09.2025 17:50 β π 2 π 0 π¬ 1 π 0Cover of the book C++ Brain Teasers by Anders Schau Knatten
Get my book at 40% off!
There's a flash sale at @pragprog.com right now, and you can get all their books at 40% off with the promo code "flashsale".
pragprog.com/titles/akbra...
Happy to announce another Pre-NDC-TechTown Oslo C++ Users Group Meetup! This year we'll have a talk by Klaus Iglberger, and as usual, @ndcconferences.com is sponsoring pizza. www.meetup.com/ocppug/event...
13.09.2025 06:40 β π 1 π 1 π¬ 0 π 0I've never made a PR to ConanCenter before. There was a fix in ffmpeg 4.4.5 which I need in order for ffmpeg 4.* to compile with GCC >12. ConanCenter currently support ffmpeg 7.1.1 and 4.4.4. Is it likely that they'll accept a PR which adds 4.4.6?
08.09.2025 12:55 β π 1 π 0 π¬ 1 π 0Just read the docs and discovered that you can turn off WarnOnSingleLocks. That helps, but should be the default imo. clang.llvm.org/extra/clang-...
01.09.2025 10:49 β π 1 π 0 π¬ 0 π 0Sonar has the same check as clang-tidy: rules.sonarsource.com/cpp/tag/sinc...
01.09.2025 10:29 β π 1 π 0 π¬ 0 π 0Clang-tidy 21 wants you to prefer scoped_lock over lock_guard. I feel scoped_lock should be a specialized tool when you need to lock several mutexes. It also allows you to pass it zero mutexes, which for a bug lock_guard doesn't allow: godbolt.org/z/WzG4YeP83
Do you think clang-tidy is right?
For reference, here's the thread discordapp.com/channels/400...
12.08.2025 07:55 β π 0 π 0 π¬ 0 π 0So intuitively, I'd expect that example to be just fine. I would just like to have a good source for that assumption. But then sehe, who counts as "asio documentation" in my book, seems to tell me I have to use an atomic here.
12.08.2025 07:49 β π 0 π 0 π¬ 1 π 0Found the thread on Discord, thanks! My question is what "proper synchronization" means. I agree that it has to do some sort of synchronization, but it also has to be fast and not do *too much* synchronization. Your example of "auto foo = new std::string();" is exactly what I'm trying to understand.
12.08.2025 07:42 β π 0 π 0 π¬ 1 π 0Haha, wrong asio! But thanks for wanting to help!
08.08.2025 10:28 β π 1 π 0 π¬ 0 π 0Can someone help me with an Asio question? Does an initiating function synchronize (memory model-wise) with the corresponding completion handler? stackoverflow.com/questions/79...
08.08.2025 09:27 β π 2 π 2 π¬ 2 π 0I'll be back at the @meetingcpp.bsky.social in Berlin this year to speak about the two memory models! Really happy about this since it's only my second time there and I didn't make the cut last year. Looking forward to it! meetingcpp.com/mcpp/schedul...
26.06.2025 19:07 β π 6 π 1 π¬ 0 π 0Buy my C++ book! Or get three chapters for free at pragprog.com/titles/akbra... (no registration required)
18.06.2025 16:34 β π 3 π 5 π¬ 0 π 0Unfortunately we did not record it. But you can see a slightly shorter version of the same talk at youtu.be/rZaPQkpuEeM?...
17.06.2025 05:36 β π 2 π 0 π¬ 1 π 0First slide of my presentation The Two Memory Models
Meetup with Oslo C++ Users Group in one hour!
16.06.2025 13:57 β π 4 π 0 π¬ 1 π 0(That's just a random link I found btw, not an endorsement of the website)
13.06.2025 14:39 β π 1 π 0 π¬ 1 π 0I'm super happy with my HΓ₯g Sofi www.lomax.se/mobler/stola...
13.06.2025 14:38 β π 1 π 0 π¬ 1 π 0NOR 3 - 0 ITA
π€―
06.06.2025 21:02 β π 1 π 0 π¬ 0 π 0We're finally back up, after almost a week of absolutely horrible customer support from @dreamhost.bsky.social. Eventually, after trying to avoid helping, ignoring me, not accepting responsibility, and blaming everything else, they found and fixed the configuration issue on their server.
01.06.2025 08:29 β π 1 π 1 π¬ 0 π 0I'm still working with @dreamhost.bsky.social support on this. All my websites on this server have been unstable since the upgrade they made on Tuesday, and we've still not gotten to the bottom of it.
31.05.2025 08:05 β π 0 π 1 π¬ 0 π 1Heads up, we will have ~30 minutes of downtime on 27 May due to a server upgrade.
26.05.2025 19:37 β π 0 π 1 π¬ 0 π 1