public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8568: Sutter's Befriending Templates troubles
@ 2002-11-20  5:26 pcarlini
  0 siblings, 0 replies; 3+ messages in thread
From: pcarlini @ 2002-11-20  5:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8568
>Category:       c++
>Synopsis:       Sutter's Befriending Templates troubles
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 13 14:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Paolo Carlini
>Release:        3.2.1 pre, 3.3 exp
>Organization:
>Environment:
Any.
>Description:
According to Herb Sutter:
http://www.cuj.com/experts/2101/sutter.htm
The following two testcases are legal and should compile:

// Example 1 again
//
namespace boost {
  template<typename T> void checked_delete( T* x ) {
    // ... other stuff ...
    delete x;
  }
}
class Test {
  ~Test() { }
  friend void boost::checked_delete( Test* x ); // the original code
};

int main() {
  boost::checked_delete( new Test );
}

///////////////////////////////

// Example 2: The other way to declare friendship
//
namespace boost {
  template<typename T> void checked_delete( T* x ) {
    // ... other stuff ...
    delete x;
  }
}
class Test {
  ~Test() { }
  friend void boost::checked_delete<>( Test* x );
};

int main() {
  boost::checked_delete( new Test );
}

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/8568: Sutter's Befriending Templates troubles
@ 2002-11-20 17:51 paolo
  0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2002-11-20 17:51 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pcarlini

Synopsis: Sutter's Befriending Templates troubles

State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Thu Nov 14 04:39:44 2002
State-Changed-Why:
    Actually, a duplicate of c++/8355, which I have updated.

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


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

* Re: c++/8568: Sutter's Befriending Templates troubles
@ 2002-11-20  5:57 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-11-20  5:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pcarlini

Synopsis: Sutter's Befriending Templates troubles

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Nov 13 15:04:46 2002
State-Changed-Why:
    Confirmed.
    
    This is probably a duplicate of PR 8355, but that report 
    seems so long and contrived that nobody seems to have taken
    the time yet to at least analyse it...

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


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

end of thread, other threads:[~2002-11-14 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20  5:26 c++/8568: Sutter's Befriending Templates troubles pcarlini
2002-11-20  5:57 bangerth
2002-11-20 17:51 paolo

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