On 1/22/22 07:17, vit wrote:

> Why local variable of type tuple call destructors immediately after
> initialization?

I don't even understand where the local variable comes from. If you want a pair of Foo objects, I would use std.typeconst.Tuple.

Otherwise I would use AliasSeq as I understand it like the following:

        alias tup = AliasSeq!(Foo, Foo);

        static foreach(Type; tup) {{
          Type x;
          writeln("check(", x.i, "): ", cast(void*)&x);
        }}

So, to me, AliasSeq!(Foo, Foo) is just a pair of types. I instantiate an object for each type individually and use it inside.

Ali

Reply via email to