Queue no longer supports types with destructors.

This commit is contained in:
Ferdinand Majerech 2014-08-05 13:12:07 +02:00
parent 7539b40d3d
commit 078269be36

View file

@ -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);
}