January 27, 2006 BUG: .sizeof doesn't work with nested structs | ||||
---|---|---|---|---|
| ||||
Attachments: | Attached sample program illustrates the problem clearly. everything works fine if the nested structs are not named. For example if you remove the BAR tag on the first nested struct then .sizeof works fine. Chris |
January 31, 2006 Re: BUG: .sizeof doesn't work with nested structs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Lajoie Attachments: | Chris Lajoie schrieb am 2006-01-27:
> Attached sample program illustrates the problem clearly. everything works fine if the nested structs are not named. For example if you remove the BAR tag on the first nested struct then .sizeof works fine.
No bug.
FOO.BAR is a type and thus doesn't require any memory within FOO.
try:
# struct FOO{
# ...
# BAR b;
# }
Thomas
|
Copyright © 1999-2021 by the D Language Foundation