===================================================================
@@ -0,0 +1,5 @@
+// PR c++/50371
+// { dg-options -std=c++0x }
+
+template<decltype(nullptr)>
+struct nt;
===================================================================
@@ -18717,6 +18717,8 @@ invalid_nontype_parm_type_p (tree type, tsubst_fla
return 0;
else if (TREE_CODE (type) == DECLTYPE_TYPE)
return 0;
+ else if (TREE_CODE (type) == NULLPTR_TYPE)
+ return 0;
if (complain & tf_error)
error ("%q#T is not a valid type for a template constant parameter", type);