Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > template parameters cannot be friends

Reply
Thread Tools

template parameters cannot be friends

 
 
red floyd
Guest
Posts: n/a
 
      04-18-2007
dragoncoder wrote:
>>> So how can I achieve this using template base class?

>> There is no way. You are not allowed to make a template argument
>> a friend. That's all.
>>

> Could you please quote the lines from the standard which enforce this?
>
>


Actually, I'm interested, too. I couldn't find it in 14.5.3 or in 14.6.5.
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      04-18-2007
dragoncoder wrote:
>>> So how can I achieve this using template base class?

>>
>> There is no way. You are not allowed to make a template argument
>> a friend. That's all.
>>

> Could you please quote the lines from the standard which enforce this?


Subclause 7.1.5.3, paragraph 2.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
Mark P
Guest
Posts: n/a
 
      04-18-2007
red floyd wrote:
> dragoncoder wrote:
>>>> So how can I achieve this using template base class?
>>> There is no way. You are not allowed to make a template argument
>>> a friend. That's all.
>>>

>> Could you please quote the lines from the standard which enforce this?
>>
>>

>
> Actually, I'm interested, too. I couldn't find it in 14.5.3 or in 14.6.5.


Try 7.1.5.3 sec. 2

Mark
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
skipping template parameters inside template parameters kito C++ 2 09-26-2010 12:04 AM
Template type parameters as friends in gcc Dave Rudolf C++ 2 03-09-2007 03:38 PM
template parameters as friends John Harrison C++ 5 11-24-2005 11:38 PM
member functions as friends - friends of each other? bipod.rafique@gmail.com C++ 2 07-16-2005 10:55 AM
Rationale behind not allowing template parameters to be friends? Asfand Yar Qazi C++ 5 04-07-2004 02:57 AM



Advertisments