This has caused a fair bit of headache for me, too. In general, favor clang++ for C++. There are a number of things that clang may not do, see, for example, StackOverflow How do I compile C++ with Clang?.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: