I am using Visual C++ 2010. Does it support the C++11 threads library, such that I could compile the code in this question?
If not, what library can I use that would support this?
I am using Visual C++ 2010. Does it support the C++11 threads library, such that I could compile the code in this 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.
std::async
, which is the greatest thing since the creation of the destructor. –
Tuner 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.
© 2022 - 2024 — McMap. All rights reserved.