public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2421: can't declare ordinary nested class as friend of template class
@ 2002-07-04  8:17 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-07-04  8:17 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jhl, mjm, nobody

Synopsis: can't declare ordinary nested class as friend of template class

State-Changed-From-To: analyzed->closed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Jul  4 08:17:26 2002
State-Changed-Why:
    Fixed in GCC 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2421


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

* c++/2421: can't declare ordinary nested class as friend of template class
@ 2001-03-28 17:56 jhl
  0 siblings, 0 replies; 2+ messages in thread
From: jhl @ 2001-03-28 17:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: mjm

>Number:         2421
>Category:       c++
>Synopsis:       can't declare ordinary nested class as friend of template class
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 28 17:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan H Lundquist
>Release:        2.95.2
>Organization:
>Environment:
Debian 2.2 i386
>Description:
The following is an example of the problem, as described in the synopsis:

class A {
public:
   class X;
};

template<typename T>
class B {
   friend class A::X;
public:
   B() {}
};

int main()
{
   B<int> b;
   return 0;
}

causes 'A::X' does not declare a template type
>How-To-Repeat:
Compile example in description
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="friend.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="friend.cpp"

Y2xhc3MgQSB7CnB1YmxpYzoKICAgY2xhc3MgWDsKfTsKCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CmNs
YXNzIEIgewogICBmcmllbmQgY2xhc3MgQTo6WDsKcHVibGljOgogICBCKCkge30KfTsKCmludCBt
YWluKCkKewogICBCPGludD4gYjsKICAgcmV0dXJuIDA7Cn0KCg==


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

end of thread, other threads:[~2002-07-04 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-04  8:17 c++/2421: can't declare ordinary nested class as friend of template class lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2001-03-28 17:56 jhl

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).