Commit 3acb1e03 by Paolo Carlini Committed by Paolo Carlini

re PR c++/50371 ([C++0x] std::nullptr_t rejected as non-type template-parameter)

/cp
2011-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50371
	* pt.c (invalid_nontype_parm_type_p): Handle NULLPTR_TYPE.

/testsuite
2011-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50371
	* g++.dg/cpp0x/nullptr24.C: New.

From-SVN: r179096
parent 63d045e1
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* pt.c (invalid_nontype_parm_type_p): Handle NULLPTR_TYPE.
2011-09-22 Jonathan Wakely <jwakely.gcc@gmail.com>
Paolo Carlini <paolo.carlini@oracle.com>
......
......@@ -18717,6 +18717,8 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)
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);
......
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* g++.dg/cpp0x/nullptr24.C: New.
2011-09-22 Uros Bizjak <ubizjak@gmail.com>
PR target/50482
......
// PR c++/50371
// { dg-options -std=c++0x }
template<decltype(nullptr)>
struct nt;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment