Re: Member Functions
From: David White (no_at_email.provided)
Date: 03/29/05
- Next message: James Dennett: "Re: Member Functions"
- Previous message: Chris Riesbeck: "Re: Correct C++ tutorial chapter 2.1 "Classes" available (Windows, mingw/msvc/std)"
- In reply to: James Dennett: "Re: Member Functions"
- Next in thread: James Dennett: "Re: Member Functions"
- Reply: James Dennett: "Re: Member Functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 12:22:47 +1000
"James Dennett" <jdennett@acm.org> wrote in message
news:3TN1e.1848$k57.1060@fed1read07...
> Code for a member function exists in only one place, and unless
> that member function is virtual there's not even need for per-
> class storage for a pointer to it. Virtual functions generally
> occupy some space for their code and also a slot in a virtual
> function table (often abbreviated to vtbl), but even then the
> virtual function table is only created once for the class, and
> each instance of a class which has a vtbl includes just a pointer
> to that vtbl.
>
> I should mention that this is not mandated by the standard, but
> is a (near-?) universal implementation technique, and can be
> helpful in understanding the typical costs of design choices.
If it's not mandated by the standard, is it ever possible, at least in
theory, for one pointer to a member function (virtual or not) to be not
equal to another pointer to the same member function?
DW
- Next message: James Dennett: "Re: Member Functions"
- Previous message: Chris Riesbeck: "Re: Correct C++ tutorial chapter 2.1 "Classes" available (Windows, mingw/msvc/std)"
- In reply to: James Dennett: "Re: Member Functions"
- Next in thread: James Dennett: "Re: Member Functions"
- Reply: James Dennett: "Re: Member Functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|