summaryrefslogtreecommitdiff
path: root/middle
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-08-24 13:01:12 +0200
committerEugen Wissner <belka@caraus.de>2025-08-24 13:01:12 +0200
commit260b1312229c39e6a1a47e5850c7aeb760dccbb2 (patch)
treea80a1fdf459a4fb49cb4d96ec0b9eddcfbf60fc3 /middle
parent1857d59375b3fc6d434f7a028143102d0e29ed34 (diff)
downloadtanya-260b1312229c39e6a1a47e5850c7aeb760dccbb2.tar.gz
Remove meta.transform duplicating Phobos
Diffstat (limited to 'middle')
-rw-r--r--middle/tanya/memory/allocator.d1
-rw-r--r--middle/tanya/memory/lifetime.d3
2 files changed, 3 insertions, 1 deletions
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);