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++


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


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