Moving towards C++11

TR1 (2006)

Visual Studio

Visual Studio 2008 included support for

  • <array>
  • <functional>
  • <memory>
  • <random>
  • <regex>
  • <tuple>
  • <type_traits>
  • <unordered_map>
  • <unordered_set>
  • <utility>

according to http://msdn.microsoft.com/en-us/library/bb982198(v=vs.90).aspx. In 2008 (VC9 compiler), this was in std::tr1, but as of 2010 (VC10 compiler), this moved to std (since it was approved).

XCode

XCode 4 has both GCC and LLVM (Clang) toolchains. LLVM uses the libc++ library, which has these in std. GCC uses libstdc++, which has these in std::tr1.

In terms of what’s supported, it seems like there is full TR1 support.

For C++11, there’s this blog post about how to build a libc++ that works on Mac OS X 10.6: http://thejohnfreeman.com/blog/2012/11/07/building-libcxx-on-mac-osx-10.6.html, and also this: http://stackoverflow.com/questions/14494513/how-do-i-get-back-c0x-c11-support-for-mac-os-x-10-6-deployment-using-xcode-4, and this makes it seem unlikely to work in reality: http://clang-developers.42468.n3.nabble.com/clang-libc-libc-ABI-amp-MacOSX-10-6-td4029112.html.

What would be ideal is not statically linking, but including a dylib for libc++ just on Mac OS 10.6 deploys.

GCC

GCC 4.2 uses std::tr1. GCC 4.8 uses std.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>