diff --git a/std/typecons.d b/std/typecons.d index 1252e6001..69c557980 100644 --- a/std/typecons.d +++ b/std/typecons.d @@ -2500,7 +2500,7 @@ if (!is(T == class)) _store = cast(Impl*) enforce(malloc(Impl.sizeof)); if (hasIndirections!T) { - GC.addRange(&_store._payload, Impl.sizeof); + GC.addRange(&_store._payload, T.sizeof); } emplace(&_store._payload, args); _store._count = 1;