ElementType!(Range) problem
Ishan Thilina
ishanthilina at gmail.com
Tue Apr 5 11:02:02 PDT 2011
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...!
More information about the Digitalmars-d-learn
mailing list