This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11721] New: error on specialization as friend class
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2003 01:38:26 -0000
- Subject: [Bug c++/11721] New: error on specialization as friend class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11721
Summary: error on specialization as friend class
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
The idea is to have a template class have a local (enclosed) class that the enclosing class is a friend of. This works fine. Now specialize the template, and you get an error on the friend declaration for the enclosing specialization. However, you *can* declare member function specializations as friends in this case - its only when the whole class is the friend that the compiler complains.
I don't *think* this error is required by the standard (but I am not a language lawyer), but even if it is required the error message should be more informative than simply telling the programmer that he has done exactly what he is trying to do.
Ivan