After moving all my code to a new M2 MacBook, my old Eclipse 4.17 (2020-09) now flags string literal arguments as "Invalid Argument".
I've since updated to the latest Eclipse 2023-06/AArch64", installed CDT, the PDT PHP Tools and Wild Web.
The problem with string literals in C++ remains. I've read a ton of old posts (like this one) and tried rebuilding the index, freshening all files, and setting the discovery to -std=c++11
per this post.
For example, given the trivial program below, the call to test("bobo")
is flagged as an invalid argument, even though std::string
is bridged to literal strings and the program compiles without error.
Any suggestions?
#include <string>
void test(const std::string &s)
{ }
int main(int argc, char **argv)
{
std::string s;
test(s); // OK
test("bobo"); // Eclipse says "Invalid Argument"
}