开发者

Does Visual C++ 2010 support the C++11 threads library?

I am using Visual C++ 2010. Does it support the C++11 threads library, such that I could compile the code in this开发者_StackOverflow question?

If not, what library can I use that would support this?


Visual C++ 2010 does not provide the C++11 thread support or atomics libraries.

If you want to use that code in Visual C++ 2010, you'll need to use a third-party implementation of those libraries. One option is just::thread; it's not free, but I have a copy and am quite pleased with it.

Alternatively, you can use another cross-platform threads library like Boost.Thread or OpenThreads or one of the native Windows threads libraries. Any of these options will probably require changes to the code in order to run.

Note that Visual C++ 11 will support these libraries, and they are included in the Visual C++ 11 Beta.


VC++ supports special embedded syntax OpenMP (http://msdn.microsoft.com/en-us/library/tt15eb9t(VS.80).aspx) - note, that g++ is also suports it, so you can get cross platform code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜