Posts
C++ Basics: Write Integers into a Bounded Buffer
Format integers without treating a bounded output range as a null-terminated string.
November 3, 2026
C++ Basics: Wait for State with a Condition-Variable Predicate
Protect the condition with a mutex and recheck it whenever a wait returns.
November 3, 2026
C++ Basics: Wait for a Batch with std::latch
Publish independent result slots and wait until a fixed batch has reported completion.
November 3, 2026
C++ Basics: Transport Worker Exceptions through a Future
Catch a worker failure, store it in a promise, and handle it where the future is consumed.
November 3, 2026
C++ Basics: Split Records with partition_copy
Copy passing and failing records into separate vectors while keeping their original relative order.
November 3, 2026
C++ Basics: Retry Initialization after std::call_once Throws
Distinguish an initialization attempt from the one successful execution recorded by a once_flag.
November 3, 2026
C++ Basics: Reset a Value and Keep Its Previous State
Use std::exchange to consume a pending count without losing the old value.
November 3, 2026
C++ Basics: Rename a Map Key Without Losing a Rejected Node
Use a node handle to rename a key and recover safely when the destination already exists.
November 3, 2026
C++ Basics: Remove Adjacent Duplicates with unique and erase
Collapse repeated neighboring values, then shrink the vector to its logical new end.
November 3, 2026
C++ Basics: Refresh Iterators After Reserving an Unordered Map
Separate iterator invalidation from element reference stability when reserving hash-table capacity.
November 3, 2026