c++: Fix up user_provided_p [PR81349]
The standard says: "A function is user-provided if it is user-declared and not explicitly defaulted or deleted on its first declaration." I don't see anything about function templates having different rules here, but user_provided_p does return true for all TEMPLATE_DECLs. The following patch fixes it by treating as user-provided only templates that aren't deleted. 2020-03-26 Jakub Jelinek <jakub@redhat.com> PR c++/81349 * class.c (user_provided_p): Use STRIP_TEMPLATE instead of returning true for all TEMPLATE_DECLs. * g++.dg/cpp1z/pr81349.C: New test.
Showing
gcc/testsuite/g++.dg/cpp1z/pr81349.C
0 → 100644
Please
register
or
sign in
to comment