Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Can't compile package_task code with 1.54
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-06-01 10:10:37


Le 01/06/13 15:15, Szymon Gatner a écrit :
>
>
>
> 2013/6/1 Vicente J. Botet Escriba <vicente.botet_at_[hidden]
> <mailto:vicente.botet_at_[hidden]>>
>
> I don't find a constructor of function from a rvalue functor.
>
> But I find an assignment
>
> This seems confusing. What am I missing?
>
>
> I don't have a standard but this is in sync what you describe:
>
> http://en.cppreference.com/w/cpp/utility/functional/function/function
>
> http://en.cppreference.com/w/cpp/utility/functional/function/operator%3D
>
> confusing indeed.
>
> Anyway, trying to:
>
> #define BOOST_THREAD_VERSION 4
>
> #include <boost/thread/future.hpp>
> #include <functional>
>
> int main()
> {
> boost::packaged_task<void()> t;
>
> std::function<void()> f2;
> f2 = std::move(t);
> }
>
> gives exactly the same compilation error:
>
>
>
I get the same kind of error for gcc-4.8.0 and clang-3.2. I suspect that
either we are missing something basic or there is a issue on the
standard specification and the standard library implementors have not
identified it while implementing these operations.

Best,
Vicente



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net