Reputation: 8490
I'm handling with some multiplatform legacy code, and there is a requirement that should compile on Visual Studio 2005.
VS 2005 supports C++11?
Upvotes: 0
Views: 2593
Reputation: 6332
No it doesn't.
VS2008 has TR1 (assuming sufficient service packs), which are some new components of the standard library like std::tr1::shared_ptr that have made their way into the standard with C++11, but it does not have new language features like lambdas, rvalue references, etc. or library features like threading or std::unique_ptr.
You can get the same effect in VS2005 with Boost's TR1 library. Then if you want cross-compiler support, you can do, e.g.,
#include <boost/tr1/memory.hpp>
int main()
{
std::tr1::shared_ptr<int> pi( new int(42) );
// ...
}
On platforms with their own TR1 implementations, Boost will use those automatically. On platforms without TR1, it will use its own implementation, imported into the std::tr1 namespace.
Upvotes: 1