[Bug c++/81311] [7/8 Regression] An std::ref argument calls copy constructor instead of template constructor in C++17 mode
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 22 03:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81311
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Mar 22 03:53:19 2018
New Revision: 258755
URL: https://gcc.gnu.org/viewcvs?rev=258755&root=gcc&view=rev
Log:
PR c++/81311 - wrong C++17 overload resolution.
* call.c (build_user_type_conversion_1): Remove C++17 code.
(conv_binds_ref_to_prvalue): New.
(build_over_call): Handle C++17 copy elision.
(build_special_member_call): Only do C++17 copy elision here if the
argument is already the right type.
Added:
trunk/gcc/testsuite/g++.dg/overload/conv-op2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
More information about the Gcc-bugs
mailing list