Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!purdue!ames!elroy!usc!orion.cf.uci.edu!uci-ics!crimee.ics.uci.edu!schmidt From: schmidt@crimee.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c++ Subject: C++ parsing questions Message-ID: <13718@paris.ics.uci.edu> Date: 9 May 89 02:43:13 GMT Sender: news@paris.ics.uci.edu Reply-To: Doug Schmidt Organization: University of California at Irvine: ICS Dept. Lines: 44 Since people seem in the mood to disambiguate obscure C++ language design points I have a quick question about the following piece of code from page 313 in the 1988 USENIX C++ Conference Proceedings. ---------------------------------------- class X { public: X (); X (X& x, int X::*p); operator int X::*(); protected: int i; double d; }; f () { X a; int X::* pi_X = a; X b = X (a, pi_X); X *px = new X (a, b); // stuff omitted... a.*pi_X = *px.*b // evaluated as ((*px).*)b.operator int X::*() } ---------------------------------------- This last line of code does not make any sense to me, especially since the precedence of the new operators .* and ->* (shown on page 311) are HIGHER than * (i.e., the dereference operator). Was this just a typo in the article? Does C++ 2.0 really evaluate things this way?!?! thanks, Doug -- On a clear day, under blue skies, there is no need to seek. And asking about Buddha +------------------------+ Is like proclaiming innocence, | schmidt@ics.uci.edu | With loot in your pocket. | office: (714) 856-4043 |