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 <boost/thread/future.hpp>

class TestEx {
public:
    void submit(std::function<void()>) {
    }

    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<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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<Rp,Cont>::shared_state_nullary_task(const boost::detail::shared_state_nullary_task<Rp,Cont> &)'
1>          with
1>          [
1>              Rp=Rp
1>          ]
1>  c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(287): note: see reference to function template instantiation 'boost::detail::shared_state_nullary_task<Rp,Cont>::shared_state_nullary_task(const boost::detail::shared_state_nullary_task<Rp,Cont> &)' being compiled
1>          with
1>          [
1>              Rp=Rp
1>          ]
1>  c:\users\james\documents\visual studio 2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3858): note: see reference to class template instantiation 'boost::detail::shared_state_nullary_task<Rp,Cont>' being compiled
1>          with
1>          [
1>              Rp=Rp
1>          ]
1>  c:\users\james\documents\visual studio 2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3873): note: see reference to function template instantiation 'void boost::detail::future_executor_shared_state<Rp>::init<T,Executor>(Executor &,Fp &&)' being compiled
1>          with
1>          [
1>              Rp=Rp,
1>              T=boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>,
1>              Executor=TestEx,
1>              Fp=boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>
1>          ]
1>  c:\users\james\documents\visual studio 2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3873): note: see reference to function template instantiation 'void boost::detail::future_executor_shared_state<Rp>::init<T,Executor>(Executor &,Fp &&)' being compiled
1>          with
1>          [
1>              Rp=Rp,
1>              T=boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>,
1>              Executor=TestEx,
1>              Fp=boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>
1>          ]
1>  c:\users\james\documents\visual studio 2015\projects\boostfuture\boostfuture\boost_1_60\boost\thread\future.hpp(3964): note: see reference to function template instantiation 'boost::future<void> boost::detail::make_future_executor_shared_state<Rp,boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>,Executor>(Executor &,Fp &&)' being compiled
1>          with
1>          [
1>              Executor=TestEx,
1>              Fp=boost::detail::invoker<main::<lambda_4383c995bef90b35d4f40a119c795fc2>,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>
1>          ]
1>  c:\users\james\documents\visual studio 2015\projects\boostfuture\boostfuture\boostfuture.cpp(34): note: see reference to function template instantiation 'boost::future<void> boost::async<TestEx,main::<lambda_4383c995bef90b35d4f40a119c795fc2>>(Executor &,F &&)' being compiled
1>          with
1>          [
1>              Executor=TestEx,
1>              F=main::<lambda_4383c995bef90b35d4f40a119c795fc2>
1>          ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========