Since I'm unable to rebuild phobos on my Windows 8.1 PC, would someone else be interested, to apply a PR? The code (including comment) would be this:

----
/**
Given an existing object $(D obj), reinitialize the object of $(D class) type $(D T) at that address. The constructor is passed the arguments
$(D Args), if any.

Returns: The reinitialized object
 */
T emplace(T, Args...)(ref T obj, auto ref Args args)
    if (is(T == class))
{
enforce!ConvException(obj !is null, "emplace: Object is null and cannot be reinitialized");

    enum classSize = __traits(classInstanceSize, T);
    void[] buf = (cast(void*) obj)[0 .. classSize];
    return emplace!T(buf, args);
}
----

Unfortunately, I do not have much time to deal with the phobos-rebuilding problem, but I still want to improve phobos.

Reply via email to