Debian Codegraph @

tests/dmd/fail_compilation/imports/imp19661.d

raw
1 template isFunction(X...)
2 if (X.length == 1)
3 {
4 static if (is(typeof(&X[0]) U : U*) && is(U == function) ||
5 is(typeof(&X[0]) U == delegate))
6 {
7 // x is a (nested) function symbol.
8 enum isFunction = true;
9 }
10 else static if (is(X[0] T))
11 {
12 // x is a type. Take the type of it and examine.
13 enum isFunction = is(T == function);
14 }
15 else
16 enum isFunction = false;
17 }