How to enable experimental C++11 concurrency features in MinGW?

前端 未结 8 1976
夕颜
夕颜 2020-11-30 06:46

When trying to compile the following code

#include 
#include 

void foo() { std::cout << \"foo\\n\"; }

int main()
{
  st         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 07:28

    As others have mentioned, the mingw port of gcc does not provide C++0x concurrency support out of the box. However, the commercial just::thread library provides these facilities, so you can use std::thread with the TDM/mingw port of gcc 4.5.2.

    Disclaimer: I am the primary developer of the just::thread library.

提交回复
热议问题