I’m trying to pick up the basics of C++11. I have Xcode 4.2 on my mac, which uses the LLVM 3.0 compiler. From what I read, it should have support for raw string literals (i.e. R"(...)") but when I try to compile something with them, it barfs at me. I have set it up for c++0x (I turned on -std=c++0x and the libc++ library) and I know it works with other c++0x features like the range for-loop.
Is there anything I’m missing here?
Sadly Apple clang 3.0 (that comes with Xcode 4.2) != clang 3.0 (which supports raw string literals.)
You’ll need to wait for a later version of Xcode, or build more recent versions of clang/llvm/libc++ from source.