Article View: comp.std.c++
Article #1230Ambiguity in member pointer declaration
From: Pochi NORIMATSU
Date: Mon, 14 Dec 1992 07:13
Date: Mon, 14 Dec 1992 07:13
25 lines
1199 bytes
1199 bytes
Sorry if this is on a FAQ list.
Assuming X, Y and Z are class names, how should
X::Y::Z::*foo;
be interpreted?
1. foo is a pointer to member of class ::Y::Z of type X.
('X' is a decl-specifier and '::Y::Z::*foo' is a declarator)
2. foo is a pointer to member of class ::Z of type X::Y.
('X::Y' is a decl-specifier and '::Z::*foo' is a declarator)
3. X::Y::Z is a decl-specifier and ::*mptr is an error.
IMHO, correct interpretation should be 3, but I'm not sure.
Please E-mail me and I'll post a summary.
Thanks in advance!
--
Yasutoshi (Pochi) Norimatsu | Never worry about theory as long as
pnori@lsi-j.co.jp | the machinery does what it's supposed
LSI Japan Co. Ltd., Tokyo, JAPAN | to do. -- R. A. Heinlein
Technical Details
Message-ID:
<PNORI.92Dec14161301@hyperion.lsi-j.co.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!ricohgwy!pattyjr!lsijgw!pnoriShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!ricohgwy!pattyjr!lsijgw!pnori From: pnori@lsi-j.co.jp (Pochi NORIMATSU) Newsgroups: comp.std.c++ Subject: Ambiguity in member pointer declaration Message-ID: <PNORI.92Dec14161301@hyperion.lsi-j.co.jp> Date: 14 Dec 92 07:13:01 GMT Sender: news@lsi-j.co.jp Organization: LSI Japan Co. Ltd., Tokyo, Japan Lines: 25 Nntp-Posting-Host: hyperion