Article View: comp.std.c++
Article #678friend declaration scope
From: Arthur Sombrito
Date: Wed, 07 Oct 1992 09:42
Date: Wed, 07 Oct 1992 09:42
20 lines
981 bytes
981 bytes
--
Hi,
I'd like to ask some rules regarding the scope of a friend declaration
which are not discussed (as far as I could tell) in the ARM.
Given the ff. code:
class B { protected : enum A {}; };
class C : public B {
friend class A; // According to the scoping rules, A refers to B::A.
// Since B::A is not a class, should we flag an error
// or do we declare a new class A since there is no
// existing type symbol in the scope of class C?
};
Thanks for any replies.
Technical Details
Message-ID:
<1992Oct7.094248.177@nuscc.nus.sg>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!arthurShow Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!nuscc!arthur From: arthur@solomon.technet.sg (Arthur Sombrito) Subject: friend declaration scope Message-ID: <1992Oct7.094248.177@nuscc.nus.sg> Sender: usenet@nuscc.nus.sg Organization: National University of Singapore X-Newsreader: TIN [version 1.1 PL6] Date: Wed, 7 Oct 1992 09:42:48 GMT Lines: 23