I can use the ElementType() template in the std.rane library to find the type of the elements of a range,isn't it? But I cant compile the following programme.
I get a "untitled.d(32): Error: template instance ElementType!(listR) does not match template declaration ElementType(R)" error. What could be the problem ? -------------------------------------------------------------------------- import std.stdio; import std.range; import std.container; int main(char[][] args) { auto list=SList!(int)(1,2,3); auto listR=list.opSlice(); writefln("%s",ElementType!(listR)); return 0; } -------------------------------------------------------------- Thank you...!