On Tuesday, 12 July 2022 at 15:30:03 UTC, Ali Çehreli wrote:
An alternative:
https://dlang.org/phobos/std_traits.html#isInstanceOf
This is a really good alternative. Because I used to have to
write longer. Thanks, the LOG thing is better now:
```d
struct LOG(T...) {
T[0] id;
T[1] data;
}
void main()
{
auto obj = //make_test(20);/*
make_test('T');//*/
alias typ = //typeof(obj);/*
LOG!(int, char);//*/
"Type: ".write;
if(isInstanceOf!(LOG, typ)/*
is(typ : Template!Args,
alias Template, Args...)//*/
) "LOG".writeln;
}
```
SDB@79