June 20, 2004 dmd crash with templates | ||||
|---|---|---|---|---|
| ||||
This crashes DMD 0.92 - WIN32
template foo(Type, alias Func)
{
int foo(Type t)
{
return Func(t);
}
}
template foo(Type)
{
int foo(Type t)
{
static int f(Type a)
{
return a;
}
return foo!(Type, f)(t);
}
}
int main(char[][] argv)
{
printf("%d\n",foo!(int)(1));
return 0;
}
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply