Ranges

Jonathan M Davis jmdavisProg at gmx.com
Sat Mar 12 16:44:44 PST 2011


On Saturday 12 March 2011 16:11:20 Bekenn wrote:
> On 3/12/2011 2:02 PM, Jonas Drewsen wrote:
> > Error message:
> > 
> > test2.d(13): Error: template std.algorithm.copy(Range1,Range2) if
> > (isInputRange!(Range1) && isOutputRange!(Range2,ElementType!(Range1)))
> > does not match any function template declaration
> > 
> > test2.d(13): Error: template std.algorithm.copy(Range1,Range2) if
> > (isInputRange!(Range1) && isOutputRange!(Range2,ElementType!(Range1)))
> > cannot deduce template function from argument types !()(char[],char[])
> 
> I haven't checked (could be completely off here), but I don't think that
> char[] counts as an input range; you would normally want to use dchar
> instead.

Char[] _does_ count as input range (of dchar). It just doesn't count as an 
_output_ range (since it doesn't really hold dchar).

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list