November 28, 2005 Internal error: ../ztc/cgcod.c 562 | ||||
---|---|---|---|---|
| ||||
The following code produces an internal error. Any commented line also produces the same error. Part 2 of the code is basically the same function, except that internally a cast to cfloat is done. Best Regards, Tiago Gasiba <snip> template _func1( T : T[] ){ void _func1( T[] data ) { data[0] /= cast(cdouble)data.length; } } alias _func1!(float[]) func1; //alias _func1!(int[]) func1; //alias _func1!(uint[]) func1; //alias _func1!(long[]) func1; //alias _func1!(ulong[]) func1; //alias _func1!(char[]) func1; //alias _func1!(byte[]) func1; /*****************************************************/ /* template _func2( T : T[] ){ void _func2( T[] data ) { data[0] /= cast(cfloat)data.length; } } alias _func2!(int[]) func2; //alias _func2!(uint[]) func2; //alias _func2!(long[]) func2; //alias _func2!(ulong[]) func2; //alias _func2!(char[]) func2; //alias _func2!(byte[]) func2; */ <snip> -- Tiago Gasiba (M.Sc.) - http://www.gasiba.de Everything should be made as simple as possible, but not simpler. |
Copyright © 1999-2021 by the D Language Foundation