[Bug libstdc++/100940] views::take and views::drop should not define _S_has_simple_extra_args
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 14 17:02:00 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100940
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.2
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Patch at: https://gcc.gnu.org/pipermail/libstdc++/2021-June/052736.html
The patch disables perfect forwarding for take/drop only when the argument is
integer-like (fixing the reported correctness issue), and also disables perfect
forwarding for split when the argument is a scalar or a copy-constructible view
(safely restoring good diagnostics for these cases).
For the other adaptors, we still unconditionally disable perfect forwarding
call wrapper semantics. I'm not sure if the performance/diagnostic tradeoff is
worth it to enable perfect forwarding semantics when the function object is
non-trivial.
More information about the Gcc-bugs
mailing list