Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get C++14 using XCode 7.0.1

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

like image 341
Aryadne Avatar asked Dec 11 '22 20:12

Aryadne


1 Answers

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.

enter image description here

Should be:

enter image description here

like image 190
Tanner Avatar answered Dec 13 '22 09:12

Tanner