Why so many errors in C++?

I tried to compile this simple C++ program on my Mac with clang++:

1
2
3
4
5
6
    #include <forward_list>
    #include <iostream>
    int main() {
      std::forward_list<int> my_list;
      return 0;
    }


The command I used to compile was

clang++ test.cpp -std=c++11 -stdlib=libc++ -o test

I got a whole bunch of terrifying compilation errors:

https://dl.dropboxusercontent.com/u/1531353/Misc/Docudocker/clangForwardListErrors.txt

What happened?
What does
clang++ --version
say?
clang++ version says

1
2
3
4
$ clang++ --version
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
Last edited on
Try the newer version 3.2:
http://llvm.org/releases/download.html#3.2
Topic archived. No new replies allowed.