Why is std::packaged_task not valid?

前端 未结 3 1840
北荒
北荒 2021-01-12 07:02

Using MSVC2012,

The following code will compile and run as expected

std::packaged_task< int() > task( []()->int{ std::cout << \"hello          


        
3条回答
  •  旧巷少年郎
    2021-01-12 07:33

    This is a bug in MSVC2012. There are quite a few bugs in the thread library implementation that ships with MSVC2012. I posted a partial list in my blog post comparing it to my commercial Just::Thread library: http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html

提交回复
热议问题