Converting a POD struct to a class at compile-time ?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 16 11:07:32 PDT 2014


Not a direct answer, but the way I'd do this is to just use 
composition:

class Foo {
    YourStruct _this;
    alias _this this;
}


boom, it'd work pretty well just like that...


More information about the Digitalmars-d-learn mailing list