Hello,
Why this doesn't work:
template DestructorType(T){
alias Get(T) = T;
alias DestructorType = Get!(typeof((void*){
T tmp;
}));
}
struct Foo{
~this()@safe{}
}
void main(){
//Error: static assert: `is(void function(void*) pure nothrow @nogc @safe : void function(void*) @safe)` is false
static assert(is(void function(void*)pure nothrow @safe @nogc : DestructorType!Foo));
}
but this work:
void main(){
alias X = void function(void*)@safe;
static assert(is(void function(void*)pure nothrow @safe @nogc : DestructorType!Foo));
}