Earlier this week, Kenny Kerr presented C++/WinRT at CppCon 20161. It is a Standard C++ projection for the Windows Runtime, based on Modern.
As far as I understand, the C++/CX compiler/preprocessor/code generator doesn't touch Standard C++ code, and with C++/WinRT being a Standard C++ library it is my naïve interpretation, that both C++/CX and C++/WinRT can be used in the same project.
Questions:
- First things first: Is my naïve interpretation correct?
- If so, can C++/CX and C++/WinRT be used in the same compilation unit?
- At what granularity can C++/CX and C++/WinRT be mixed, in case they cannot reside in the same compilation unit?
- Can C++/WinRT consume types implemented with C++/CX in the same project? (I expect this to be difficult, since the C++/WinRT compiler needs to generate headers from the .winmd metadata, so there is a dependency on the (pre-)compiler output.)
In case it matters, answers to those questions allow me to make decisions now on how to move my C++/CX projects into the future.
1 Embracing Standard C++ for the Windows Runtime (on YouTube).