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++/15695] New: Instantiations of a template cannot be mutual friends?


template<typename T> class A;

template<typename T> class A {
public:
    template<typename R>
    friend class A<R>;
    };

int main() {
    return 0;
    }

gets:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc:6: error: partial specialization `A<R>' declared `friend'

Is this a bug, a hole in the language, or are you supposed to declare mutual friendship some other way?

Ivan

-- 
           Summary: Instantiations of a template cannot be mutual friends?
           Product: gcc
           Version: 3.4.0
            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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15695


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