On Wed Apr 26 15:27:25 2023 +0000, Matteo Bruni wrote:
I overlooked this the first time around. Why the double #define? Does MSVC not like it otherwise?
I don't claim to understand it myself, but https://gcc.gnu.org/onlinedocs/gcc-4.8.5/cpp/Stringification.html
So afaiu the STR macro goes from STR(42) to "42", but STR(D3D_COMPILER_VERSION) gives "D3D_COMPILER_VERSION". So we need an extra macro to expand the D3D_COMPILER_VERSION macro - XSTR(D3D_COMPILER_VERSION) will give 47 (no string, just an int literal), then STR(47) gives us "47" as a string.