EDIT 10/2013: this answer is really old, Apple Clang does support this now.
C++11 Initializer Lists are not yet supported as of Clang 3.0
See the implementation status here: Clang C++11 implementation status
(Your syntax looks correct if only the compiler supported this feature)
Related Contents:
- What is Objective C++? [closed]
- Qt Creator – Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
- Compiling simple Hello World program on OS X via command line
- Can I use C++11 with Xcode?
- static variable link error [duplicate]
- How do I create a new C++ project in Xcode?
- Missing C++ header after updating OSX Command Line Tools 6.3
- Which macro to wrap Mac OS X specific code in C/C++
- New to Xcode can’t open files in c++?
- Printing/Debugging libc++ STL with Xcode/LLDB
- How can I include in Xcode
- How to have CMake show headers-that are not part of any binary target-in the IDE?
- CMake error no CMAKE_C_COMPILER could be found using Xcode and GLFW
- “std::endl” vs “\n”
- Undefined reference to vtable
- What’s the most efficient way to erase duplicates and sort a vector?
- Are there benefits of passing by pointer over passing by reference in C++?
- How to use enums in C++
- In CMake, how can I test if the compiler is Clang?
- What modern C++ libraries should be in my toolbox? [closed]
- What does iterator->second mean?
- Should I compile with /MD or /MT?
- const char* concatenation
- Calling pthread_cond_signal without locking mutex
- Difference between priority queue and a heap
- Should C++ eliminate header files? [closed]
- How to create/read/write JSON files in Qt5
- What can make C++ RTTI undesirable to use?
- How can I iterate over a packed variadic template argument list?
- Why std::cout instead of simply cout?
- What does “int* p=+s;” do?
- C++11 does not deduce type when std::function or lambda functions are involved
- How to find a value in a sorted C++ vector in the most efficient way?
- Does std::atomic work appropriately?
- C++ extern keyword on functions. Why no just include the header file?
- Check double variable if it contains an integer, and not floating point
- cin and getline skipping input [duplicate]
- Fast n choose k mod p for large n?
- Linear index upper triangular matrix
- The difference between delete and delete[] in C++ [duplicate]
- “&” meaning after variable type [duplicate]
- What is the motivation behind static polymorphism in C++?
- How can I traverse/iterate an STL map?
- Designing an event mechanism in C++
- What is use of the ref-qualifier `const &&`?
- C++ Thread Pool [closed]
- C++ exception class design [closed]
- How do I implement convenient logging without a Singleton?
- How can you define a static data member of a class template?
- Where should a static const data member be defined? [duplicate]