aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-05-05 17:39:19 -0400
committerJason Merrill <jason@redhat.com>2020-05-05 17:40:18 -0400
commite42f342652981aa9181cc3ceb04e0eb715506764 (patch)
treefe36b710321c53a5f0f802d943041065c1eb52c9 /gcc/cp
parent04b89192ace3a766a17374d5bef8fb19d9be2d7c (diff)
downloadgcc-e42f342652981aa9181cc3ceb04e0eb715506764.zip
gcc-e42f342652981aa9181cc3ceb04e0eb715506764.tar.gz
gcc-e42f342652981aa9181cc3ceb04e0eb715506764.tar.bz2
c++: CWG2235 partial ordering and non-dependent types
Issue 2235 removed the rule previously added for issues 1391/1847 that had partial ordering completely ignore function parameters with no deducible template parameters. gcc/cp/ChangeLog 2020-05-05 Jason Merrill <jason@redhat.com> CWG 2235 * pt.c (more_specialized_fn): Do consider parms with no deducible template parameters.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c9
2 files changed, 6 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 71ca21f..c49e90e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,11 @@
2020-05-05 Jason Merrill <jason@redhat.com>
+ CWG 2235
+ * pt.c (more_specialized_fn): Do consider parms with no deducible
+ template parameters.
+
+2020-05-05 Jason Merrill <jason@redhat.com>
+
PR c++/90212
* constexpr.c (potential_constant_expression_1): In a lambda
function, consider a captured variable directly.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ff8391c..2ed6d0e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -23960,13 +23960,6 @@ more_specialized_fn (tree pat1, tree pat2, int len)
len = 0;
}
- /* DR 1847: If a particular P contains no template-parameters that
- participate in template argument deduction, that P is not used to
- determine the ordering. */
- if (!uses_deducible_template_parms (arg1)
- && !uses_deducible_template_parms (arg2))
- goto next;
-
if (TYPE_REF_P (arg1))
{
ref1 = TYPE_REF_IS_RVALUE (arg1) + 1;
@@ -24088,8 +24081,6 @@ more_specialized_fn (tree pat1, tree pat2, int len)
These must be unordered. */
break;
- next:
-
if (TREE_CODE (arg1) == TYPE_PACK_EXPANSION
|| TREE_CODE (arg2) == TYPE_PACK_EXPANSION)
/* We have already processed all of the arguments in our