Subject: [Boost-bugs] [Boost C++ Libraries] #9366: async(Executor, ...) fails to compile with msvc-10, 11, 12
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-11 20:13:57
#9366: async(Executor, ...) fails to compile with msvc-10,11,12
-------------------------------------+----------------------
Reporter: viboes | Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+----------------------
The following code
{{{
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
{
try
{
boost::executor_adaptor<boost::thread_pool> ex(1);
boost::future<int> f = boost::async(ex, &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 < ms(300));
std::cout << __FILE__ << "[" << __LINE__ << "] " << (t1 -
t0).count() << std::endl;
}
catch (std::exception& ex)
{
std::cout << __FILE__ << "[" << __LINE__ << "]" << ex.what() <<
std::endl;
BOOST_TEST(false && "exception thrown");
}
catch (...)
{
BOOST_TEST(false && "exception thrown");
}
}
#endif
}}}
generates this compile error in line [HERE].
{{{
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 >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<boost::thread_pool>' : multiple default
constructors specified
..\libs\thread\test\sync\futures\async\async_pass.cpp(224) : see
reference to class template instantiation
'boost::executor_adaptor<boost::thread_pool>' being compiled
C:\local\boost\boost/exception/exception.hpp(451) : error C2280:
'boost::detail::async_func<int (__cdecl *)(void),>::async_func(const
boost::detail::async_func<int (__cdecl *)(void),> &)' : attempting to
reference a deleted function
C:\local\boost\boost/thread/detail/async_func.hpp(49) : see
declaration of 'boost::detail::async_func<int (__cdecl
*)(void),>::async_func'
This diagnostic occurred in the compiler generated function
'boost::detail::shared_state_nullary_task<Rp,Fp>::shared_state_nullary_task(const
boost::detail::shared_state_nullary_task<Rp,Fp> &)'
with
[
Rp=Rp
, Fp=boost::detail::async_func<int (__cdecl *)(void),>
]
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9366> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC