The following c++ code compiles fine with MSVC but doesn't compile with CLang.
void Test()
{
auto str = __FUNCTION__ "." "Description";
}
why does this work for MSVC only? how do I make this work for clang? (. and Description can append without any issues in both compilers)
clang error: expected ';' at end of declaration
Note that "Test . Description" is not a solution, I want to use this in a macro and make static strings based on what function the macro is used in.
__FUNCTION__, because it contains two consecutive underscores, is reserved for use by the implementation. Whatever it does is up to the compiler writer. So consult your compiler's documentation.std::source_location