From 078269be369decaea23b835d331474af9c846704 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Tue, 5 Aug 2014 13:12:07 +0200 Subject: [PATCH] Queue no longer supports types with destructors. --- source/dyaml/queue.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dyaml/queue.d b/source/dyaml/queue.d index 8b2fd1b..1030cd4 100644 --- a/source/dyaml/queue.d +++ b/source/dyaml/queue.d @@ -30,6 +30,7 @@ package: /// implementing a range, as this is used only as a placeholder until Phobos gets a /// decent replacement. struct Queue(T) + if(!hasMember!(T, "__dtor")) { private: /// Linked list node containing one element and pointer to the next node. @@ -217,7 +218,6 @@ void free(T)(T* ptr) @system nothrow { // GC doesn't need to care about any references in this struct anymore. static if(hasIndirections!T) { GC.removeRange(cast(void*)ptr); } - static if(hasMember!(T, "__dtor")) { (*ptr).destroy; } core.stdc.stdlib.free(ptr); }