Creating a class at a specific address in memory.

TheFlyingFiddle theflyingfiddle at gmail.com
Thu Dec 12 14:54:25 PST 2013


What i am looking for is something like the following.

class Foo
{
     int a, b, c;
}

void main() {
     void[] buffer = new void[1024];
     auto foo = createAt!(Foo)(buffer.ptr);
}


Where the createAt!(Foo) creates a class of the type Foo at the
specified pointer.



More information about the Digitalmars-d-learn mailing list