diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-12-23 01:49:39 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-12-23 01:49:39 +0000 |
commit | f65b7de376c7284b60167d8400ddbcfddff58db6 (patch) | |
tree | 4c5c5a0c980555c0ce0fddce4de3ce48657dd981 /gcc/cp/pt.c | |
parent | 4ca551d190ba0fb10ab0fa13535a2bf20d95e477 (diff) | |
download | gcc-f65b7de376c7284b60167d8400ddbcfddff58db6.zip gcc-f65b7de376c7284b60167d8400ddbcfddff58db6.tar.gz gcc-f65b7de376c7284b60167d8400ddbcfddff58db6.tar.bz2 |
re PR c++/18733 (friend rejected)
PR c++/18733
* pt.c (check_explicit_specialization): Use special logic to validate
befriended specializations.
PR c++/18733
* g++.dg/template/friend33.C: New testcase.
From-SVN: r92527
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a73f691..07cdd5d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1738,7 +1738,15 @@ check_explicit_specialization (tree declarator, tree dname = DECL_NAME (decl); tmpl_spec_kind tsk; - tsk = current_tmpl_spec_kind (template_count); + if (is_friend) + { + if (!processing_specialization) + tsk = tsk_none; + else + tsk = tsk_excessive_parms; + } + else + tsk = current_tmpl_spec_kind (template_count); switch (tsk) { |