We have code that uses these two together, but sometimes puts the inclusions in the wrong order. For the integration to work, #include <wil/cppwinrt.h> must come before any inclusions of WinRT headers.
- wil/cppwinrt.h should detect being included after any WinRT headers, and issue an appropriate error.
- wil/result_macros.h may need to help out, enabled by some compile-time validation?
The result is leaked exceptions - when the inclusion is in the wrong order, the cppwinrt ABI try/catch(...) failfasts on anything that's not std:: or winrt::.