Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > template friend...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 13 Topic 43367 of 48044
Post > Topic >>

template friend class

by Kira Yamato <kirakun@[EMAIL PROTECTED] > Feb 17, 2008 at 04:28 PM

A question about declaring a friend class.  The following does not compile:

template<class C>
class B
{
public:

friend class C;
};

g++4.0.1 returns the error message

    error: using template type parameter 'C' after 'class'


So, is there a way to declare a friend class from the template parameter?

-- 

// kira
 




 13 Posts in Topic:
template friend class
Kira Yamato <kirakun@[  2008-02-17 16:28:10 
Re: template friend class
Jeff Schwab <jeff@[EMA  2008-02-17 13:46:39 
Re: template friend class
Kira Yamato <kirakun@[  2008-02-17 17:01:35 
Re: template friend class
Pavel <dot_com_yahoo@[  2008-02-17 22:46:07 
Re: template friend class
=?ISO-8859-1?Q?Marcel_M=F  2008-02-18 21:42:52 
Re: template friend class
aaragon <alejandro.ara  2008-02-17 15:42:44 
Re: template friend class
Kira Yamato <kirakun@[  2008-02-17 19:08:50 
Re: template friend class
Jeff Schwab <jeff@[EMA  2008-02-17 16:09:52 
Re: template friend class
Kai-Uwe Bux <jkherciue  2008-02-17 20:06:19 
Re: template friend class
James Kanze <james.kan  2008-02-18 02:04:35 
Re: template friend class
Kai-Uwe Bux <jkherciue  2008-02-18 08:29:14 
Re: template friend class
James Kanze <james.kan  2008-02-18 10:00:10 
Re: template friend class
Kai-Uwe Bux <jkherciue  2008-02-18 22:53:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:40:55 CDT 2008.