public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15695] New: Instantiations of a template cannot be mutual friends?
@ 2004-05-28 18:07 igodard at pacbell dot net
  2004-05-28 18:49 ` [Bug c++/15695] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: igodard at pacbell dot net @ 2004-05-28 18:07 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/15695] Instantiations of a template cannot be mutual friends?
  2004-05-28 18:07 [Bug c++/15695] New: Instantiations of a template cannot be mutual friends? igodard at pacbell dot net
@ 2004-05-28 18:49 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-28 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 01:29 -------
14.5.3 - Friends [temp.friend], p9, says that "Friend declarations shall not declare partial 
specializations."

I think it is time to sometime to use google to check first if there is a bug.

Also I think this is a hole in the language.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-28  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-28 18:07 [Bug c++/15695] New: Instantiations of a template cannot be mutual friends? igodard at pacbell dot net
2004-05-28 18:49 ` [Bug c++/15695] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).