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
This commit is contained in:
parent
63d045e14e
commit
3acb1e03c4
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
5
gcc/testsuite/g++.dg/cpp0x/nullptr24.C
Normal file
5
gcc/testsuite/g++.dg/cpp0x/nullptr24.C
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/50371
|
||||
// { dg-options -std=c++0x }
|
||||
|
||||
template<decltype(nullptr)>
|
||||
struct nt;
|
Loading…
Reference in New Issue
Block a user