windows - Compiler error for std::string in c++ builder XE3 project -


i working on service application in c++ builder xe3. getting compiler error std::string if add line:

string = string("abcd") + "xyz"; 

error output follows:

[bcc32 error] string(141): e2285 not find match 'move<_ty>(string)'   full parser context string(140): decision instantiate: string std::string + <char,char_traits<char>,allocator<char> >(string &&,const char *) --- resetting parser context instantiation... svcmain.cpp(21): #include c:\program files\embarcadero\rad studio\10.0\include\boost_1_39\boost\tr1\tr1\string string(20): #include c:\program files\embarcadero\rad studio\10.0\include\../include/dinkumware/string string(7): namespace std string(140): parsing: string std::string + <char,char_traits<char>,allocator<char> >(string &&,const char *) 

i tried add #include <utility> above #include <string> still getting same error. instead, if split line 2 follows, compiles without errors.

string = string("abcd"); += "xyz"; 

or

string b = string("abcd"); string = b + "xyz"; 

its not practical use workaround have use existing code getting large no of errors. same code works without errors in other xe3 project. ideas how fix error?

i found fix in other project. setting "backward compatibility" option false fixed error. can find checkbox in - project options -> c++ compiler -> compatibility -> general. set true.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -