Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!milano!cadillac!sunburn!dsouza From: dsouza@mcc.com [Desmond D'Souza] Newsgroups: comp.lang.c++ Subject: Ambiguity and Access Control Message-ID: <4051@cadillac.CAD.MCC.COM> Date: 17 Nov 89 20:33:19 GMT Sender: news@cadillac.CAD.MCC.COM Reply-To: dsouza@mcc.com Distribution: na Organization: MCC VLSI-CAD Program, Austin, TX Lines: 29 In 2.0, is ambiguity checked independently (before) access control. If so, WHY ? Given: class LIB_CLASS { private: int i ; } ; in some pre-compiled library. Given that there is NO way I can access/use "LIB_CLASS::i", it should be quite invisible to me. However, the following happens when I try to use LIB_CLASS: class B1 { public: int i ; } ; // my int "i" class D : public B1, public LIB_CLASS { void foo () { i = 0 ; } // ERROR! "i" is ambiguous } ; Of course, the same happens if I derive :privately from LIB_CLASS. Seems counter intuitive to the purpose of ":private" members, which should be quite invisible and should not cause name conflicts. Desmond. Desmond D'Souza, MCC CAD Program | ARPA: dsouza@mcc.com | Phone: [512] 338-3324 Box 200195, Austin, TX 78720 | UUCP: {uunet,harvard,gatech,pyramid}!cs.utexas.edu!milano!cadillac!dsouza