From -4200692252320162236
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,4e0e65235aa5eceb,start
X-Google-Attributes: gidf78e5,public
From: Colin Rafferty <craffert@ms.com>
Subject: pointer to member derivation question
Date: 1999/06/23
Message-ID: <vgvk8swxj97.fsf@ms.com>#1/1
X-Deja-AN: 492751306
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
X-Original-Date: 22 Jun 1999 13:00:52 -0400
X-Y-Zippy: Did I do an INCORRECT THING??
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.unimelb.edu.au
X-Face: ByE+UMAp1klWR3?\RNGx(A-~Ri!YT%C6M!sxoJL+.;9`Q/|+dj7[KR>gGMyV.2qZeot0NI`4\MA^_Qg`F9=+Ox&zaE?Y9dV%F~Xzf';Zyk2Aobs.uu^Ey0_C6^~q';G#$HkA!ZAHXPpG-"*|Dd*Z4U$4y{{aI0c%75}i~Of(jxYtI[uIpYF<*Zoe|\*/ufb
X-Trace: izvestia.its.unimelb.edu.au 930101152 3792 128.250.29.16 (23 Jun 1999 01:25:52 GMT)
Organization: -
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN3A3juEDnX0m9pzZAQFI1QF/ZU7KZV/Lvi2t9/1R1kZdPov2upSYWAEA BR7OtGC8nI1rPnFW2tGAx7P/7/QBW4y8 =LasL
Keywords: derived,class,base
X-Attribution: >
User-Agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) XEmacs/21.2 (Sakuragawa)
Mime-Version: 1.0
NNTP-Posting-Date: 23 Jun 1999 01:25:52 GMT
Newsgroups: comp.std.c++

Hi-

I have the following code, and it makes sense to me that it should
work, but different compilers have different thoughts on the subject.

    class Base { /* ... */ };
    
    class Derived : public Base { /* ... */ };
    
    class Holder
    {
    public:
      Derived _derived;
    };
    
    void f()
    {
      Base Holder::* elt = &Holder::_derived;
    }

I don't have a copy of the standard, but the Dec 96 WP seems to say
nothing about it in either [dcl.mptr] or [conv.mem].

Thanks.

-- 
Colin
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



