Hi,
I'm getting an error with the following code only with Visual C++. (VS 2015
update 2. I also tried preview of VS 15 but it's the same)
Clang and GCC are OK with this but perhaps VS is just more strict but
correct?
The error is deep in boost internals and I can't work out which object is
move only and/or has it's copy constructor deleted or if it's true at all!
Any help greatly appreciated.
kind regards,
James Swift
---------------------------------
#define BOOST_THREAD_PROVIDES_FUTURE
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_PROVIDES_EXECUTORS
#include
class TestEx {
public:
void submit(std::function) {
}
bool try_executing_one() {
return false;
}
bool closed() {
return false;
}
void close() {
}
};
int main()
{
TestEx tex;
boost::async(
tex,
[](){});
return 0;
}
-----------------------------------
1>------ Build started: Project: BoostFuture, Configuration: Debug Win32
------
1> BoostFuture.cpp
1>c:\users\james\documents\visual studio
2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3801):
error C2280:
'boost::detail::invoker,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>::invoker(const
boost::detail::invoker,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>
&)': attempting to reference a deleted function
1> c:\users\james\documents\visual studio
2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\detail\invoker.hpp(731):
note: compiler has generated
'boost::detail::invoker,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>::invoker'
here
1> c:\users\james\documents\visual studio
2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3800):
note: while compiling class template member function
'boost::detail::shared_state_nullary_task