Remove meta.transform duplicating Phobos

This commit is contained in:
2025-08-24 13:01:12 +02:00
parent 1857d59375
commit 260b131222
23 changed files with 25 additions and 1904 deletions

View File

@@ -17,6 +17,7 @@
*/
module tanya.memory.allocator;
import std.traits : hasElaborateDestructor;
import tanya.memory.lifetime;
import tanya.meta.trait;

View File

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