I recently upgraded from XCode 10.3 to 11.3 and to UE 4.24. Since then, I’ve been getting “Invalid operands to binary expression (‘const FString’ and const wchar_t[x]” errors on lines where I combine multiple strings with the + operator.
Lines like the following cause the issue:
Line(L"struct " + Structname);
Where Structname is a const FString and the Line function expects another FString. Keep in mind this code works on Visual Studio using MSVC. Is this due to UE 4.24 or the XCode compiler? Due to company reasons my access to the Mac is limited, so I have to research a bit before I can try compiling again.
Possibly xcode compiler is only accepting + operator overload from the type on the right, normally you can not use + with literal strings which for C and C++ are char arrays, functions like that are implemented in string types depending on implementation.
FString have many function that let you combine strings, like this one:
Or this one which emulates behavior of standard library printf