&& !get_partial_spec_bindings (maintmpl, maintmpl, specargs))
{
auto_diagnostic_group d;
- if (permerror (input_location, "partial specialization %qD is not "
- "more specialized than", decl))
+ if (pedwarn (input_location, 0,
+ "partial specialization %qD is not more specialized than",
+ decl))
inform (DECL_SOURCE_LOCATION (maintmpl), "primary template %qD",
maintmpl);
}
/* Now check whether the type of this parameter is still
dependent, and give up if so. */
++processing_template_decl;
- tparm = tsubst (tparm, targs, tf_none, NULL_TREE);
+ tparm = tsubst (TREE_TYPE (parm), targs, tf_none, NULL_TREE);
--processing_template_decl;
if (uses_template_parms (tparm))
return unify_success (explain_p);
--- /dev/null
+// PR c++/86193
+// CWG 455 (active)
+// { dg-options "" } // clear -pedantic-errors
+
+template<class T> struct value_type;
+
+template<class T, typename value_type<T>::type V>
+struct A;
+
+template<class T, int V>
+struct A<T*, V> { }; // { dg-warning "not more specialized" }
--- /dev/null
+// PR c++/105289
+// CWG 455 (active)
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct value_type;
+
+template<class List, typename value_type<List>::type Element>
+struct push_front_vlist;
+
+template<template<class X, X...> class XList, class T, T Arg, T... Vs>
+struct push_front_vlist<XList<T, Vs...>, Arg> { }; // { dg-error "not more specialized" }