Can someone explain why the following does not work?
int main() // Tried on several recent C++ '03 compilers. { #define FOO L const wchar_t* const foo = FOO"bar"; // Will error out with something like: "identifier 'L' is undefined." #undef FOO }
I thought that preprocessing is done in an earlier translation phase than string literals and general token translation.
Will more or less the compiler see this:
int main() { const wchar_t* const foo = L"bar"; }
It would be great if someone could provide an explanation from the standard.
source share