From -8262106596404943652
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,aabeddb13805d371
X-Google-Attributes: gidf78e5,public
From: sebor@my-deja.com
Subject: Re: friend lookup
Date: 1999/09/09
Message-ID: <7r8nnl$kh8$1@nnrp1.deja.com>#1/1
X-Deja-AN: 523029130
X-NNTP-Posting-Host: 209.107.51.186
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <7r5t5l$hmr$1@nnrp1.deja.com> <p6q3dwp2m7z.fsf@informatik.hu-berlin.de>
X-UID: 0000000001
X-Status: $$$T
X-Http-User-Agent: Mozilla/4.61 [en] (WinNT; I)
X-Http-Proxy: 1.0 x28.deja.com:80 (Squid/1.1.22) for client 209.107.51.186
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Thu Sep 09 16:37:11 1999 GMT
X-MyDeja-Info: XMYDJUIDsebor
Newsgroups: comp.std.c++
Originator: clamage@taumet


In article <p6q3dwp2m7z.fsf@informatik.hu-berlin.de>,
  Martin von Loewis <loewis@informatik.hu-berlin.de> wrote:
>
> sebor@my-deja.com writes:
>
> > Can anyone point me to the section in the Standard that makes this
> > [il]legal?
>
> It is legal, according to 7.3.1.2, [namespace.memdef]/3:
>
> # If a friend declaration in a non�local class first declares a class
> # or function the friend class or function is a member of the
> # innermost enclosing namespace. The name of the friend is not found
> # by simple name lookup until a matching declara�tion is provided in
> # that namespace scope (either before or after the class declaration
> # granting friendship). If a friend function is called, its name may
> # be found by the name lookup that considers functions from
> # name�spaces and classes associated with the types of the function
> # arguments (3.4.2).
>
> You probably need to have 14.5.3, [temp.friend]/3:
>
> # A friend template may be declared within a class or class
> # template. A friend function template may be defined within a class
> # or class template, but a friend class template may not be defined
> # in a class or class template.
>
> Hope this helps,
> Martin
>

I was just pointed to 14.8.2.4, p4 - it would seem that the arguments,
in fact, cannot be deduced, do you agree?

Martin


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




