@@ -3380,28 +3380,27 @@ private U[] _dup(T, U)(scope T[] a) // pure nothrow depends on postblit
33803380private extern (C) void [] _d_newarrayU(const TypeInfo ti, size_t length) pure nothrow ;
33813381
33823382
3383- private template _PostBlitType (T)
3384- {
3385- // assume that ref T and void* are equivalent in abi level.
3386- static if (is (T == struct ))
3387- alias _PostBlitType = typeof (function (ref T t){ T a = t; });
3388- else
3389- alias _PostBlitType = typeof (delegate (ref T t){ T a = t; });
3390- }
3391-
3392- // Returns null, or a delegate to call postblit of T
3383+ /* *************
3384+ * Get the postblit for type T.
3385+ * Returns:
3386+ * null if no postblit is necessary
3387+ * function pointer for struct postblits
3388+ * delegate for class postblits
3389+ */
33933390private auto _getPostblit (T)() @trusted pure nothrow @nogc
33943391{
33953392 // infer static postblit type, run postblit if any
33963393 static if (is (T == struct ))
33973394 {
33983395 import core.internal.traits : Unqual;
33993396 // use typeid(Unqual!T) here to skip TypeInfo_Const/Shared/...
3400- return cast (_PostBlitType! T)typeid (Unqual! T).xpostblit;
3397+ alias _PostBlitType = typeof (function (ref T t){ T a = t; });
3398+ return cast (_PostBlitType)typeid (Unqual! T).xpostblit;
34013399 }
34023400 else if ((&typeid (T).postblit).funcptr ! is &TypeInfo .postblit)
34033401 {
3404- return cast (_PostBlitType! T)&typeid (T).postblit;
3402+ alias _PostBlitType = typeof (delegate (ref T t){ T a = t; });
3403+ return cast (_PostBlitType)&typeid (T).postblit;
34053404 }
34063405 else
34073406 return null ;
0 commit comments