>>809
ありがとうございます.しかし、>>808の関数も、

int func(int x) { return x*2; }
void main() {
 assert(twice(&func)(1) == 4);
}

は、うまく動きますが、
 auto f = twice(&twice!(int));
とすると、>>808のようにエラーがでてしまいます.