I'm trying to make my project compile under GCC (Visual Studio compiles it flawlessly).
I have a custom assert function which throws a wstring message. A part of it is the _ FUNCTION_ macro, which I "unicodize" using the WIDEN macro from MSDN
#define WIDEN2(x) L ## x
#define WIDEN(x) WIDEN2(x)
It compiles okay in MSVC, but it prints this in GCC:
error: ‘L__FUNCTION__’ was not declared in this scope
The only solution I could come with is to convert the contents of _FUNCTION _ to wstring on runtime using mbstowcs, but I would like to find a compile-time way to do it.
Thanks for help.