Need help with movement from C to D
Andrey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 6 04:09:36 PDT 2014
On Monday, 5 May 2014 at 17:55:37 UTC, Meta wrote:
>
> enum offsetof(T, string field) = mixin(type.stringof ~ "." ~
> field ~ ".offsetof");
>
> To ensure that a syntactically valid symbol is passed as the
> type.
Interestingly, but this code doesn't compile:
enum offsetof(typenfield) = mixin(type.stringof ~ ".offsetof");
writeln(offsetof!(StrToBob.bob));
More information about the Digitalmars-d-learn
mailing list