Is there a way to extract the correct typeinfo of an array if I only have the pointer?

Code:
----
import std.stdio;

struct Foo {
        int i;
}

void foo(void* p) {
    // ???
}

void main() {
    Foo[] fs;
    fs ~= Foo();

    foo(fs.ptr);
}
----

Now that we have only the untyped void*: Is there a way how I can extract the right typeinfo? Something to rebuild the correct type out of the adress.

Reply via email to