public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24629]  New: Can't use template argument as friend
@ 2005-11-02  1:48 mikel at att dot net
  2005-11-02  1:53 ` [Bug c++/24629] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: mikel at att dot net @ 2005-11-02  1:48 UTC (permalink / raw)
  To: gcc-bugs

Fails on:
  gcc (GCC) 3.3.4 (Mandrakelinux 10.1 3.3.4-2mdk)
  Linux 2.6.8.1-12mdk #1 i686 Athlon XP GNU/Linux

and

  g++ (GCC) 3.4.0
  SunOS 5.9 Generic_112233-12 sun4u sparc SUNW,UltraAX-i2

The following fails to compile:

template<class T>
class Foo {
    // The "friend" declaration below causes fialure with
    // error: using template type parameter `T' after `class'
    friend class T;
};

class Bar {
};

int
main(int, char**)
{
    Foo<Bar> foo;
    return 0;
}


-- 
           Summary: Can't use template argument as friend
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mikel at att dot net


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


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-24629-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-02-14 23:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-02  1:48 [Bug c++/24629] New: Can't use template argument as friend mikel at att dot net
2005-11-02  1:53 ` [Bug c++/24629] " pinskia at gcc dot gnu dot org
2005-11-02  9:20 ` giovannibajo at libero dot it
2005-11-03  1:28 ` mikel at att dot net
2007-01-06  5:28 ` pinskia at gcc dot gnu dot org
2008-06-22 20:14 ` pinskia at gcc dot gnu dot org
     [not found] <bug-24629-4@http.gcc.gnu.org/bugzilla/>
2011-02-15  0:13 ` pinskia at gcc dot gnu.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).