The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jan 20, 2025
Post comments count 1
Post likes count 3

Reminder: When a C++ object fails to construct, the destructor does not run

Raymond Chen

If you need to run after a failed construction, you have to put it in a base class or member variable.

Jan 17, 2025
Post comments count 6
Post likes count 3

The case of the crash when trying to erase an element from a std::set

Raymond Chen

Another kind of fiasco.

Jan 16, 2025
Post comments count 3
Post likes count 2

In a C++ class template specialization, how can I call the unspecialized version of a method?

Raymond Chen

You can't talk about things that might exist, so instead talk about things that do.

Jan 15, 2025
Post comments count 0
Post likes count 2

How does Get­User­Default­Geo­Name choose between ISO 3166-1 and UN M.49 codes?

Raymond Chen

Clarifying the behavior.

Jan 14, 2025
Post comments count 5
Post likes count 2

Microspeak: The walk-on topic

Raymond Chen

Just walk on in with your topic.

Jan 13, 2025
Post comments count 4
Post likes count 3

A simplified overview of ways to add or update elements in a std::map

Raymond Chen

And using it to find missing opportunities.

Jan 10, 2025
Post comments count 2
Post likes count 1

Why does inadvertently passing a std::string instead of a char const* to a variadic function crash on x86-32 but not x86-64?

Raymond Chen

Looking at the calling convention and the small string optimization.

Jan 9, 2025
Post comments count 0
Post likes count 4

Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 2

Raymond Chen

Digging into the libstdc++ implementation.

Jan 8, 2025
Post comments count 1
Post likes count 2

Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 1

Raymond Chen

Waiting on a single pointer, but checking for two.