March 05, 2005 struct.field.offsetof doesn't work for some types | ||||
---|---|---|---|---|
| ||||
With Linux dmd v0.114 when I try to compile: struct S { uint ui; void function() func; long l; void[] va; byte b; void* vp; short[] delegate(Object) dg; char c; } size_t o_ui = S.ui.offsetof; size_t o_func = S.func.offsetof; // error size_t o_l = S.l.offsetof; size_t o_va = S.va.offsetof; size_t o_b = S.b.offsetof; size_t o_vp = S.vp.offsetof; // error size_t o_dg = S.dg.offsetof; size_t o_c = S.c.offsetof; I get: $ dmd -c offsetof.d offsetof.d(14): no property 'offsetof' for type 'void()' offsetof.d(18): no property 'offsetof' for type 'void' |
Copyright © 1999-2021 by the D Language Foundation