blob: 9c13328982afe16aab98bf44c2a2f2bbc334c7e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// REQUIRED_ARGS: -o-
// PERMUTE_ARGS:
template FunctionTypeOf(func...)
if (func.length == 1)
{
static if (is(typeof(& func[0]) Fsym : Fsym*) && is(Fsym == function) || is(typeof(& func[0]) Fsym == delegate))
{
alias Fsym FunctionTypeOf;
}
else static if (is(typeof(& func[0].opCall) Fobj == delegate))
{
alias Fobj FunctionTypeOf;
}
else
static assert(0);
}
enum DummyEnum;
static assert(!is(FunctionTypeOf!DummyEnum));
|