digitalmars.D - Problem with string.whitespace and newline
- Michael Chen (15/15) Jun 11 2011 The following code cannot be compiled
The following code cannot be compiled
string clean(string x)
{
	return join(split(x),whitespace);
}
The compile error is
Error	2	Error: template std.array.join(RoR,R) if (isInputRange!(RoR)
&& isInputRange!(ElementType!(RoR)) && isForwardRange!(R)) cannot
deduce template function from argument types
!()(string[],immutable(char[6u]))
However this line is fine
 join(split(x)," ");
The same problem happens when using newline. Is this a bug?
Best,
Mike
 Jun 11 2011








 
  
  
  Michael Chen <sth4nth gmail.com>
 Michael Chen <sth4nth gmail.com>