Object Pointer

Namespace rswhite4 at googlemail.com
Sun Jul 15 15:47:27 PDT 2012


Is something like this possible?

Foo* create_ptr(Foo f) {
     assert(f !is null);
     // ...
}

Foo* fp = create_ptr(new Foo());

with "ref Foo f" of course, there is no limitation.


More information about the Digitalmars-d-learn mailing list