diff options
author | Jason Merrill <jason@redhat.com> | 2011-05-27 00:04:40 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-05-27 00:04:40 -0400 |
commit | 866e414678bba1426d1a777eb4a2ae591915b092 (patch) | |
tree | 7375a36b894bcab99a69b2597ab44cb65898175b /gcc/cp/pt.c | |
parent | 5ac537d7b4983abe5eebe510c798bede816c8165 (diff) | |
download | gcc-866e414678bba1426d1a777eb4a2ae591915b092.zip gcc-866e414678bba1426d1a777eb4a2ae591915b092.tar.gz gcc-866e414678bba1426d1a777eb4a2ae591915b092.tar.bz2 |
re PR c++/47721 ([C++0x] Updated friendship rules?)
PR c++/47721
* parser.c (cp_parser_member_declaration): Allow friend T.
* friend.c (make_friend_class): Ignore non-classes.
* pt.c (instantiate_class_template_1): Handle TEMPLATE_TYPE_PARM.
From-SVN: r174319
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 28c82b8..767c4f6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8472,7 +8472,8 @@ instantiate_class_template_1 (tree type) friend_type = TREE_TYPE (friend_type); adjust_processing_template_decl = true; } - else if (TREE_CODE (friend_type) == TYPENAME_TYPE) + else if (TREE_CODE (friend_type) == TYPENAME_TYPE + || TREE_CODE (friend_type) == TEMPLATE_TYPE_PARM) { /* This could be either |