OS-X support for std :: tr1

What is the current support for tr1 or the new C ++ 0x on Mac

I know that the gcc shipped with Xcode always has a couple of versions behind, available from gcc.gnu.org, so I'm just wondering what the state of the game was for modern support.

For example, do I need to load boost to use shared_ptr, or can I get it from std :: tr1?

+7
c ++ c ++ 11 tr1 macos
source share
1 answer

OS X 10.6 ships with g ++ 4.2.1, as well as g ++ 4.0, but you must install your own build if necessary. The GNU tools for this are amazing. This builds on my machine, Mac Snow Leopard with g ++ 4.2.1:

#include <tr1/memory> int main(int argc, char* argv[]) { std::tr1::shared_ptr<int> p; return 0; } 
+9
source share

All Articles