commit cd8d1cb9501d6151febfba17c240f8bbba2d25af
Author: Jason Merrill <jason@redhat.com>
Date: Mon Dec 19 16:28:19 2011 -0500
PR c++/51530
* pt.c (unify): Handle NULLPTR_TYPE.
@@ -16614,6 +16614,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
case BOOLEAN_TYPE:
case ENUMERAL_TYPE:
case VOID_TYPE:
+ case NULLPTR_TYPE:
if (TREE_CODE (arg) != TREE_CODE (parm))
return unify_type_mismatch (explain_p, parm, arg);
new file mode 100644
@@ -0,0 +1,13 @@
+// PR c++/51530
+// { dg-options -std=c++0x }
+
+template <class T, class U>
+void f(T, U);
+
+template <class T>
+void f(T, decltype(nullptr));
+
+int main()
+{
+ f(1, nullptr);
+}