pointer equality and inheritance
From: sb (spam_bait101_at_yahoo.com)
Date: 04/01/04
- Next message: Pete Vidler: "Re: pointer equality and inheritance"
- Previous message: Christopher Benson-Manica: "Re: Problem adding a SubMenu inside the systemMenu of an application"
- Next in thread: Pete Vidler: "Re: pointer equality and inheritance"
- Reply: Pete Vidler: "Re: pointer equality and inheritance"
- Reply: Leor Zolman: "Re: pointer equality and inheritance"
- Reply: John Harrison: "Re: pointer equality and inheritance"
- Reply: Nick Hounsome: "Re: pointer equality and inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Apr 2004 13:28:43 -0800
Given this relationship,
class Base {
//...
};
class Derived : public Base {
//...
bool myself(const void* p) { return p == this}
};
Is there a guarantee in the standard that
Derived d;
Base* p = &d;
d.myself((void*)p); // - ?
will be always true?
- Next message: Pete Vidler: "Re: pointer equality and inheritance"
- Previous message: Christopher Benson-Manica: "Re: Problem adding a SubMenu inside the systemMenu of an application"
- Next in thread: Pete Vidler: "Re: pointer equality and inheritance"
- Reply: Pete Vidler: "Re: pointer equality and inheritance"
- Reply: Leor Zolman: "Re: pointer equality and inheritance"
- Reply: John Harrison: "Re: pointer equality and inheritance"
- Reply: Nick Hounsome: "Re: pointer equality and inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|