Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!milano!cadillac!puma!vaughan From: vaughan@puma.cad.mcc.com (Paul Vaughan) Newsgroups: comp.lang.c++ Subject: operator inheritance Message-ID: <2588@cadillac.CAD.MCC.COM> Date: 29 Aug 89 16:26:26 GMT Sender: news@cadillac.CAD.MCC.COM Lines: 28 The following code was compiled with g++ 1.35 and also with the test version of 1.36. Both produced the error message shown. I need to know if this is correct behavior or not. Also, I need to know if virtual operators should work in the same manner as virtual functions. class A { public: operator=(int i) {value=i;} private: int value; }; class B : public A { public: }; main() { A a; a = 3; B b; b.operator=(3); b = 3; //vop.cc:17: assignment not defined for type `B' } Being able to use the functional syntax but not the operator syntax seems inconsistent. Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639 Box 200195, Austin, TX 78720 | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan