home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1773 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!ricohgwy!pattyjr!lsijgw!pnori
  2. From: pnori@lsi-j.co.jp (Pochi NORIMATSU)
  3. Newsgroups: comp.std.c++
  4. Subject: Ambiguity in member pointer declaration
  5. Message-ID: <PNORI.92Dec14161301@hyperion.lsi-j.co.jp>
  6. Date: 14 Dec 92 07:13:01 GMT
  7. Sender: news@lsi-j.co.jp
  8. Organization: LSI Japan Co. Ltd., Tokyo, Japan
  9. Lines: 25
  10. Nntp-Posting-Host: hyperion
  11.  
  12. Sorry if this is on a FAQ list.
  13.  
  14. Assuming X, Y and Z are class names, how should
  15.  
  16.     X::Y::Z::*foo;
  17.  
  18. be interpreted?
  19.  
  20. 1. foo is a pointer to member of class ::Y::Z of type X.
  21.    ('X' is a decl-specifier and '::Y::Z::*foo' is a declarator)
  22.  
  23. 2. foo is a pointer to member of class ::Z of type X::Y.
  24.    ('X::Y' is a decl-specifier and '::Z::*foo' is a declarator)
  25.  
  26. 3. X::Y::Z is a decl-specifier and ::*mptr is an error.
  27.  
  28. IMHO, correct interpretation should be 3, but I'm not sure.
  29.  
  30. Please E-mail me and I'll post a summary.
  31.  
  32. Thanks in advance!
  33. --
  34. Yasutoshi (Pochi) Norimatsu      | Never worry about theory as long as
  35. pnori@lsi-j.co.jp                | the machinery does what it's supposed
  36. LSI Japan Co. Ltd., Tokyo, JAPAN | to do.            -- R. A. Heinlein
  37.