This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11721] New: error on specialization as friend class


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]