Posts
C++ Basics: Look Up String Keys with a String View
Enable heterogeneous ordered-map lookup with a transparent comparator.
November 3, 2026
C++ Basics: Keep a Deque Reference Across End Insertions
Use the reference guarantee for deque end insertion without retaining invalid iterators.
November 3, 2026
C++ Basics: Handle Empty Ranges Before Reading Minima and Maxima
Check the iterators returned by minmax_element before dereferencing an empty result.
November 3, 2026
C++ Basics: Find Common Values in Sorted Ranges
Use set_intersection with sorted inputs and an output inserter that grows the destination.
November 3, 2026
C++ Basics: Distinguish a Boolean Snapshot from a Vector Proxy
Request bool explicitly when you need an independent value from vector.
November 3, 2026
C++ Basics: Define Explicit Operators for Scoped Flags
Combine named flags while keeping the bitwise conversion inside a small typed interface.
November 3, 2026
C++ Basics: Count Independent Events with a Relaxed Atomic
Use atomic read-modify-write operations for a counter whose value is read after workers join.
November 3, 2026
C++ Basics: Copy Object Representation with std::bit_cast
Distinguish copying an integer representation from converting its numeric value.
November 3, 2026
C++ Basics: Choose Copies or References in Structured Bindings
See when editing a tuple binding changes the original record.
November 3, 2026
C++ Basics: Build Prefix Totals with partial_sum
Turn a sequence of daily counts into cumulative totals without writing a manual accumulation loop.
November 3, 2026