This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: std::packaged_task trunk problem
On 7 November 2011 09:51, Jonathan Wakely wrote:
> On 7 November 2011 09:26, Lars Gullik Bjønnes wrote:
>>
>> This is the wrapper I ended up with. I had to remove the throw, it
>> triggered all the time.
>
> What if you give PretendToBeCopyable a noexcept destructor?
> That should ensure the container will move it rather than copy it,
> whenever possible.
And of course also make the copy constructor throw again, or you won't
know if the nothrow destructor made any difference or not.