diff --git a/std/algorithm/mutation.d b/std/algorithm/mutation.d index c8eb6735afc..7e0370a3072 100644 --- a/std/algorithm/mutation.d +++ b/std/algorithm/mutation.d @@ -1411,8 +1411,8 @@ void moveEmplace(T)(ref T source, ref T target) @system memset(&source, 0, sz); else { - auto init = typeid(T).initializer(); - memcpy(&source, init.ptr, sz); + const T init; + memcpy(&source, &init, sz); } } }