Re: std::packaged_task trunk problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes:

| On 7 November 2011 10:46, Lars Gullik Bjønnes wrote:
>>
>> Yes it compiles. The copy constructor is still run, but if having that
>> throw I still get into std::terminate.
>
| The reason the copy constructor does still get called is because
| std::function doesn't have a noexcept move constructor, so resizing
| the vector will copy the function (which copies its target
| PretendToBeCopyable) instead of moving it.
>
| I hadn't realised how hard it is to make this work with the final
| C++11 rules :-\

I guess I am into more fun now that I want my spawn_task to take
arguments for the spawned function as well. :-)

-- 
   Lgb



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux