This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] My unreviewed patches


On Sat, 23 Aug 2003 22:43:02 +0700, Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> wrote:

> Jason Merrill wrote:
>
>>Ah, yes.  But then you don't handle
>>
>> template <class T> template <class U> template <class V>  friend void
>> A<T>::B<U>::f(V);
>>
>>which would have friend_depth == 3.  Why is that too many template headers?
>>Similarly, why do you want to reject
>>
>>template <class T> template <class U>
>>  friend void A<T>::B<U>::f();
>>
> We can support those.  It's just a tweak to deal with more complex cases
> in is_friend (or a function called by it). But I am not sure if the
> standard intends to allow arbitrary number of nested class templates like
> the above cases.  The feature is only described in two sentences and an
> example.  Do you think we should handle this?

Yes.  I can't see any justification for only allowing one level of nesting.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]