This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: using offsetof with g++
- From: Michael Matz <matz at suse dot de>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Joe Buck <jbuck at synopsys dot com>, Doug Evans <dje at transmeta dot com>,<gcc at gcc dot gnu dot org>
- Date: Thu, 6 Nov 2003 21:18:06 +0100 (CET)
- Subject: 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.