Boost C++ Libraries: Ticket #9366: async(Executor, ...) fails to compile with msvc-10,11,12 https://svn.boost.org/trac10/ticket/9366 <p> The following code </p> <pre class="wiki">#ifdef BOOST_THREAD_PROVIDES_EXECUTORS { try { boost::executor_adaptor&lt;boost::thread_pool&gt; ex(1); boost::future&lt;int&gt; f = boost::async(ex, &amp;f0); // [HERE] boost::this_thread::sleep_for(ms(300)); Clock::time_point t0 = Clock::now(); BOOST_TEST(f.get() == 3); Clock::time_point t1 = Clock::now(); BOOST_TEST(t1 - t0 &lt; ms(300)); std::cout &lt;&lt; __FILE__ &lt;&lt; "[" &lt;&lt; __LINE__ &lt;&lt; "] " &lt;&lt; (t1 - t0).count() &lt;&lt; std::endl; } catch (std::exception&amp; ex) { std::cout &lt;&lt; __FILE__ &lt;&lt; "[" &lt;&lt; __LINE__ &lt;&lt; "]" &lt;&lt; ex.what() &lt;&lt; std::endl; BOOST_TEST(false &amp;&amp; "exception thrown"); } catch (...) { BOOST_TEST(false &amp;&amp; "exception thrown"); } } #endif </pre><p> generates this compile error in line [HERE]. </p> <pre class="wiki"> Test output: teeks99-10-win2008-64on64 - thread - async__async_p / msvc-12.0 Rev 86614 / Mon, 11 Nov 2013 02:28:09 +0000 Compile [2013-11-11 13:03:02 UTC]: fail call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 &gt;nul cl /Zm800 -nologo @"C:\local\results\boost\bin.v2\libs\thread\test\async__async_p.test\msvc-12.0\debug\address-model-64\threading-multi\sync\futures\async\async_pass.obj.rsp" async_pass.cpp C:\local\boost\boost/thread/executor.hpp(230) : warning C4520: 'boost::executor_adaptor&lt;boost::thread_pool&gt;' : multiple default constructors specified ..\libs\thread\test\sync\futures\async\async_pass.cpp(224) : see reference to class template instantiation 'boost::executor_adaptor&lt;boost::thread_pool&gt;' being compiled C:\local\boost\boost/exception/exception.hpp(451) : error C2280: 'boost::detail::async_func&lt;int (__cdecl *)(void),&gt;::async_func(const boost::detail::async_func&lt;int (__cdecl *)(void),&gt; &amp;)' : attempting to reference a deleted function C:\local\boost\boost/thread/detail/async_func.hpp(49) : see declaration of 'boost::detail::async_func&lt;int (__cdecl *)(void),&gt;::async_func' This diagnostic occurred in the compiler generated function 'boost::detail::shared_state_nullary_task&lt;Rp,Fp&gt;::shared_state_nullary_task(const boost::detail::shared_state_nullary_task&lt;Rp,Fp&gt; &amp;)' with [ Rp=Rp , Fp=boost::detail::async_func&lt;int (__cdecl *)(void),&gt; ] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9366 Trac 1.4.3 viboes Tue, 12 Nov 2013 18:37:58 GMT owner, status changed https://svn.boost.org/trac10/ticket/9366#comment:1 https://svn.boost.org/trac10/ticket/9366#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Mon, 18 Nov 2013 22:44:10 GMT <link>https://svn.boost.org/trac10/ticket/9366#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9366#comment:2</guid> <description> <p> Changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/86744" title="Thread: improve async_func to try to solve msvc issue with executor.">[86744]</a> seems to fix the trunk errors. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 23 Nov 2013 18:19:28 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/9366#comment:3 https://svn.boost.org/trac10/ticket/9366#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> Ticket viboes Wed, 12 Mar 2014 22:46:59 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9366#comment:4 https://svn.boost.org/trac10/ticket/9366#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket