Anders Schau Knatten
banner
knatten.bsky.social
Anders Schau Knatten
@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.
Reposted by Anders Schau Knatten
We just published a new question! Is there a data race here? https://cppquiz.org/quiz/question/400
November 10, 2025 at 9:00 AM
Reposted by Anders Schau Knatten
Funding: if your mid/large business uses Dear ImGui - and maybe you are approaching end of year budget/planning etc. - please consider reaching out (PM/email) so I can help you help Dear ImGui !
November 5, 2025 at 8:00 PM
Reposted by Anders Schau Knatten
We just published a new question! This one makes me think of JavaScript... https://cppquiz.org/quiz/question/403
November 3, 2025 at 9:00 AM
Reposted by Anders Schau Knatten
Join us next week in Berlin or online!
November 2, 2025 at 1:00 PM
We (Modulo One) have a new single out today! It's a melodic techno track with a dark story.
Links to YouTube, Spotify, etc at distrokid.com/hyperfollow/...
October 31, 2025 at 5:31 PM
Reposted by Anders Schau Knatten
We just published a new question! This one was contributed by Lino Gamba. https://cppquiz.org/quiz/question/404
October 27, 2025 at 7:50 AM
Just two weeks until Meeting C++! Who's coming? meetingcpp.com/mcpp/schedule/

@meetingcpp.bsky.social
Meeting C++ 2025 live schedule
meetingcpp.com
October 22, 2025 at 7:59 AM
Reposted by Anders Schau Knatten
We just published a new user contributed question! https://cppquiz.org/quiz/question/398
October 20, 2025 at 7:50 AM
Reposted by Anders Schau Knatten
We just published a new question! This one was contributed by GitHub user demercurizer. https://cppquiz.org/quiz/question/394
October 13, 2025 at 7:50 AM
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!
October 10, 2025 at 8:44 AM
Reposted by Anders Schau Knatten
We just published a new user contributed question! https://cppquiz.org/quiz/question/393
October 6, 2025 at 7:40 AM
Reposted by Anders Schau Knatten
We just published a new question! This one was contributed by Armen Aslanyan: https://cppquiz.org/quiz/question/391
September 29, 2025 at 7:20 AM
My 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
C++ Under the Sea 2025 – International C++ Conference 2025
cppunderthesea.nl
September 28, 2025 at 7:26 AM
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...
September 21, 2025 at 5:51 PM
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...
September 18, 2025 at 12:06 PM
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...
September 13, 2025 at 6:40 AM
I'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?
September 8, 2025 at 12:55 PM
Clang-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?
Compiler Explorer - C++ (x86-64 clang (trunk))
int main() { std::mutex m; { // Normal use case std::lock_guard l{m}; } { // Fails to compile if you forget to pass it the mutex, good! std::lock_guard ...
godbolt.org
September 1, 2025 at 7:24 AM
Can someone help me with an Asio question? Does an initiating function synchronize (memory model-wise) with the corresponding completion handler? stackoverflow.com/questions/79...
Do asio initiating functions synchronize with the completion handlers?
I'm trying to understand the memory order related to asio initiating functions and completion handlers, but I can't find any documentation on this. Asio examples tend to start the io_context::run t...
stackoverflow.com
August 8, 2025 at 9:27 AM
I'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...
Anders Schau Knatten - The Two Memory Models
Programming languages like C, C++, and Rust all define a memory model, which allows you to reason about the ordering of memory operations in your program
meetingcpp.com
June 26, 2025 at 7:07 PM
Buy my C++ book! Or get three chapters for free at pragprog.com/titles/akbra... (no registration required)
June 18, 2025 at 4:34 PM
Meetup with Oslo C++ Users Group in one hour!
June 16, 2025 at 1:57 PM
🤯
June 6, 2025 at 9:02 PM