Path: utzoo!attcan!uunet!seismo!sundc!pitstop!texsun!sun-barr!rutgers!mit-eddie!uw-beaver!apollo!mrst!sdti!turner From: turner@sdti.SDTI.COM (Prescott K. Turner) Newsgroups: comp.lang.c++ Subject: Re: C++ parsing questions Summary: It's a typo. Message-ID: <455@sdti.SDTI.COM> Date: 10 May 89 16:37:00 GMT References: <13718@paris.ics.uci.edu> Reply-To: turner@sdti.UUCP (0006-Prescott K. Turner, Jr.) Organization: Software Development Technologies, Sudbury MA Lines: 24 In article <13718@paris.ics.uci.edu> Doug Schmidt writes: X * px; ... > a.*pi_X = *px.*b; // evaluated as ((*px).*)b.operator int X::*() >Was this just a typo in the article? Does C++ 2.0 really evaluate >things this way?!?! It's got at least one typo independent of the question you raised. You can never put a parenthesis between an operator and its operand. Fixing this gives a.*pi_X = *px.*b; // evaluated as (*px).*(b.operator int X::*()) Cfront 1.2, which also supports pointers to members, accepts a.*pi_X = (*px).*(b.operator int X::*()); and rejects a.*pi_X = *px.*(b.operator int X::*()); so it is very likely that the article meant to say a.*pi_X = (*px).*b; // evaluated as (*px).*(b.operator int X::*()) -- Prescott K. Turner, Jr. Software Development Technologies, Inc. P.O. Box 366, Sudbury, MA 01776 USA (508) 443-5779 UUCP: ...{harvard,mit-eddie}!sdti!turner Internet: turner@sdti.sdti.com