Here’s my article in the February 2015 issue of MSDN Magazine:
After the second coming of COM, otherwise known as the Windows Runtime, the need for an efficient and reliable smart pointer for COM interfaces is more important than ever. But what makes for a good COM smart pointer? The ATL CComPtr class template has been the de facto COM smart pointer for what feels like decades. The Windows SDK for Windows 8 introduced the ComPtr class template as part of the Windows Runtime C++ Template Library (WRL), which some hailed as a modern replacement for the ATL CComPtr. At first, I also thought this was a good step forward, but after a lot of experience using the WRL ComPtr, I’ve come to the conclusion it should be avoided.
This is another example from Modern C++ for the Windows Runtime. It doesn’t play a central role in the library but comes in handy when you need to interop with other APIs not covered by the Modern compiler. You can read about one of the key building blocks of the Modern project in this article where I discuss the implementation of IUnknown and IInspectable with variadic templates.