[Bug libstdc++/60564] [4.8/4.9 Regression] [C++11] The std::packaged_task constructor taking a reference to a functor does not copy its argument.

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 18 16:31:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60564

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Mar 18 16:30:28 2014
New Revision: 208655

URL: http://gcc.gnu.org/viewcvs?rev=208655&root=gcc&view=rev
Log:
    PR libstdc++/60564
    * include/std/future (__future_base::_Task_state<>): Change
    constructors to template functions using perfect forwarding.
    (__create_task_state): Use decayed type as stored task.
    (packaged_task::packaged_task(_Fn&&)): Forward instead of moving.
    * testsuite/30_threads/packaged_task/60564.cc: New.

Added:
   
branches/gcc-4_8-branch/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
Modified:
    branches/gcc-4_8-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_8-branch/libstdc++-v3/include/std/future



More information about the Gcc-bugs mailing list