C++ TR1 in Visual Studio 2008

If you are stuck with Visual Studio 2008 for some reason and need to compile C++ code that is using C++11 features like random or unordered_set, then the TR1 may be an option for you. TR1 is an early draft of the features that were later incorporated into C++11. To get TR1 for Visual Studio 2008, download the Visual C++ 2008 Feature Pack Release from here.

Note that, the namespace for the TR1 features will be std::tr1. For example, std::unordered_set needs to be called as std::tr1::unordered_set. A minor inconvenience, but easy to find and replace in the code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.