[Bug libstdc++/84532] [7 Regression] std::thread::__make_invoker prematurely unwraps reference_wrappers

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 26 17:14:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84532

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Feb 26 17:09:34 2018
New Revision: 258004

URL: https://gcc.gnu.org/viewcvs?rev=258004&root=gcc&view=rev
Log:
PR libstdc++/84532 prevent unwrapping of reference_wrapper arguments

Backport from mainline
2018-02-23  Jonathan Wakely  <jwakely@redhat.com>

        PR libstdc++/84532
        * include/std/thread (thread::__make_invoker): Construct tuple
        directly instead of using make_tuple.
        * testsuite/30_threads/async/84532.cc: New.
        * testsuite/30_threads/thread/84532.cc: New.

Added:
    branches/gcc-7-branch/libstdc++-v3/testsuite/30_threads/async/84532.cc
    branches/gcc-7-branch/libstdc++-v3/testsuite/30_threads/thread/84532.cc
Modified:
    branches/gcc-7-branch/libstdc++-v3/ChangeLog
    branches/gcc-7-branch/libstdc++-v3/include/std/thread


More information about the Gcc-bugs mailing list