This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using offsetof with g++


Hi,

On 6 Nov 2003, Gabriel Dos Reis wrote:

>    Why do you want to take the offsetof a non-POD?
>
> (I know Matt gave at least two reasons but I can't recall; I just
> remember mine was not convincing enough).

Like Joe's example: a simple struct, with some (non-virtual) methods,
maybe just a constructor to make initialization of the struct members
syntactically pleasing (after all C++ is just fancy syntax, like all
programming languages).  No inheritance, no nothing ;-)  At least that
convinces me ;)


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]