Making an agile version of a Windows Runtime delegate in C++/WinRT, part 2 - The Old New Thing13 hours agohttps://devblogs.microsoft.com/oldnewthing/20260721-00/?p=112550该函数现在在包装委托前,通过检查IAgileObject接口来判断委托是否已具备敏捷性。如果委托具有IAgileObject标记,则直接返回原始委托,不进行敏捷包装。若不具备敏捷性,函数会使用winrt::agile_ref创建敏捷包装器,以支持跨单元使用。尝试通过值传递委托来实现复制省略并不可行,因为函数参数不符合复制省略的条件。
Making an agile version of a Windows Runtime delegate in C++/WinRT, part 3 - The Old New Thing13 hours agohttps://devblogs.microsoft.com/oldnewthing/20260722-00/?p=112552