This simple program (when compiled on Linux) will CORRECTLY give two different answers based on whether it\'s compiled with -std=c++0x or not.
-std=c++0x
Problem:
It appears to be an issue with clang using libstdc++ by default rather than libc++. Compiling like this: clang++ -std=c++0x -stdlib=libc++ test.cpp results in the expected output.
clang++ -std=c++0x -stdlib=libc++ test.cpp