问题
I'm trying to use C++14 in XCode 7.0.1 and it's not working. I'm trying to use a std::string literal and I'm getting the error:
Invalid suffix on literal; C++11 requires a space between literal and identifier.
Since this is supposed to use C++14 why am I getting this error? I tried looking all around XCode for a setting or something but I can't find anything. I also tried looking online for answers but all the answers relate to earlier versions of XCode.
Here's a pic: Error Message
回答1:
Try changing the "C++ Language Dialect" setting in your Build Settings. Right now it is probably set at C++11 but should be changed to C++14.
Should be:
来源:https://stackoverflow.com/questions/33358313/cant-get-c14-using-xcode-7-0-1