This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: using offsetof with g++
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Michael Matz <matz at suse dot de>
- Cc: Joe Buck <jbuck at synopsys dot com>, Doug Evans <dje at transmeta dot com>, <gcc at gcc dot gnu dot org>
- Date: 06 Nov 2003 21:25:42 +0100
- Subject: Re: using offsetof with g++
- Organization: Integrable Solutions
- References: <Pine.LNX.4.44.0311062115270.23185-100000@wotan.suse.de>
Michael Matz <matz@suse.de> writes:
| 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 ;)
The issue is whether or that initialization could be provided in a
non-"compromising" way -- such ways (like generalized initializers)
are already subject of active works.
-- Gaby