From 260b1312229c39e6a1a47e5850c7aeb760dccbb2 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 24 Aug 2025 13:01:12 +0200 Subject: Remove meta.transform duplicating Phobos --- middle/tanya/memory/allocator.d | 1 + middle/tanya/memory/lifetime.d | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'middle') diff --git a/middle/tanya/memory/allocator.d b/middle/tanya/memory/allocator.d index 188eff9..a5a10f4 100644 --- a/middle/tanya/memory/allocator.d +++ b/middle/tanya/memory/allocator.d @@ -17,6 +17,7 @@ */ module tanya.memory.allocator; +import std.traits : hasElaborateDestructor; import tanya.memory.lifetime; import tanya.meta.trait; diff --git a/middle/tanya/memory/lifetime.d b/middle/tanya/memory/lifetime.d index 606086f..caae384 100644 --- a/middle/tanya/memory/lifetime.d +++ b/middle/tanya/memory/lifetime.d @@ -14,6 +14,7 @@ */ module tanya.memory.lifetime; +import std.traits : isInnerClass, hasElaborateAssign, hasElaborateCopyConstructor, hasElaborateDestructor; import tanya.memory.allocator; import tanya.meta.metafunction; import tanya.meta.trait; @@ -60,7 +61,7 @@ package(tanya) void destroyAllImpl(R, E)(R p) * Postcondition: $(D_PARAM memory) and the result point to the same memory. */ T emplace(T, U, Args...)(void[] memory, U outer, auto ref Args args) -if (!isAbstractClass!T && isInnerClass!T && is(typeof(T.outer) == U)) +if (is(T == class) && !isAbstractClass!T && isInnerClass!T && is(typeof(T.outer) == U)) in { assert(memory.length >= stateSize!T); -- cgit v1.2.3