On 08/06/10 22:25, Larry Luther wrote:
Q: Is this the way it's supposed to be?
Yes, byte implicitly casts to ubyte so it's accepted. Try switching the templates round, they will both be byte. The way around this is to add template constraints to the templates:
void get(T:ubyte)(T[] buffer) if( is( T == ubyte ) ) { } void get(T:byte)(T[] buffer) if( is( T == byte ) ) { } etc. Hope this helps, Robert