[Bug libstdc++/66284] std::reference_wrapper is transparent to std::function::target_type
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 13 19:15:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66284
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 39806
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39806&action=edit
Patch to remove special-case for reference_wrapper.
This patch makes it work as desired. We need to fix 3-4 test cases too which
explicitly check for the current behaviour (it's by design, matching
Boost.Function).
I submitted a defect report, with a proposed change to make the copy + move
constructors say "if f’s target is a <DEL>callable
object passed via</DEL><INS>specialization of</INS> reference_wrapper
or a function pointer."
More information about the Gcc-bugs
mailing list