From 6305522962147280488
X-Google-Thread: f78e5,6044e1103a193178
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: eldiener_no_spam_here@earthlink.net (Edward Diener No Spam)
Newsgroups: comp.std.c++
Subject: Re: associated namespaces do not comprise enclosing classes of the
 base class
Date: Thu, 24 Nov 2005 04:43:38 GMT
Organization: EarthLink Inc. -- http://www.EarthLink.net
Lines: 38
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <tu1hf.4620$wf.1023@newsread3.news.atl.earthlink.net>
References: <dltrlj$5vk$1@kontener.atcom.net.pl>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1132807426 11241 158.152.254.254 (24 Nov 2005 04:43:46 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 24 Nov 2005 04:43:46 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v2.1 on mailbox4.ucsd.edu;
	Wed, 23 November 2005 09:17:16 -0800 (PST)
X-Accept-Language: en-us, en
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id jAO4hc3g021370;
	Thu, 24 Nov 2005 15:43:38 +1100 (EST)
X-NNTP-Posting-Date: Wed, 23 Nov 2005 09:17:13 PST
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox4.ucsd.edu  (v1.6 Aug  4 2005 15:27:38, -2.8/5.0 3.0.4)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 58453 jANHHFdD061392 mailbox4.ucsd.edu)
Xref: g2news1.google.com comp.std.c++:2583

Christopher Yeleighton wrote:
> The following code is ill-formed by 3.4.2/2:
> 
> struct A {
> 
> struct B { struct C; };
> 
> friend void f(int);
> 
> };
> 
> struct B1: public A::B { };
> 
> void fun(A::B::C &c) { f(c); }
> 
> void fun(B1 &b) { f(b); }
> 
> 
> 
> What is the motivation of not associating struct A with parameters b and c? 

Look at the function prototype for 'f'. Does it say anything about 
taking struct A as a parameter ?

> Visual C++ 8.0 does and says 'cannot convert to 'int'' in spite of the 
> standard.

The function 'f' takes an 'int' as its only parameter. What do you 
expect Visual C++ 8.0 to say ? A friend function does not have a hidden 
'this' in its function prototype. I think you are confused by what 
'friend' means in C++.

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]



