From 4707971168008968635 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,7961205d5764d0b X-Google-Attributes: gidf78e5,public From: Christopher Eltschka Subject: Re: A suspect bug in Visual C++ Date: 1998/11/30 Message-ID: <36628BDA.8CBA1B9F@physik.tu-muenchen.de>#1/1 X-Deja-AN: 417157504 X-Nntp-Posting-Host: coulomb.t30.physik.tu-muenchen.de Content-Transfer-Encoding: 7bit Approved: stephen.clamage@sun.com (comp.std.c++) References: <8767c1s375.fsf@pot.cnuce.cnr.it> X-UID: 0000000001 X-Status: $$$T Content-Type: text/plain; charset=us-ascii Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Mime-Version: 1.0 Newsgroups: comp.std.c++ Originator: clamage@taumet Martin von Loewis wrote: > > Francis Glassborow writes: > > > I think you have to declare friend void f() in both A and B. Can anyone > > quote the Standard to justify accepting the code as written? [...] > Otherwise, it seems that you need access to each part of the qualified > name. Still, the VC++ message is confusing, since it is A::B in the > original poster's example which cannot be accessed. What about the following similar case? class A { class B { struct C {}; friend void f() { C* p; } }; }; Semantically it should be the same (except that f is inline now, of course). But is it also the same according to access rules? [ 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 ]