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
try return join(split(x),whitespace[]);
It seems whitespace is a static array.
On 6/12/11, Michael Chen sth4...@gmail.com wrote:
The following code cannot be compiled
string clean(string x)
{
return join(split(x),whitespace);
}
The compile error is
Error 2 Error: template
Thanks Andrej, it works.
On Sun, Jun 12, 2011 at 9:14 AM, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
try return join(split(x),whitespace[]);
It seems whitespace is a static array.
On 6/12/11, Michael Chen sth4...@gmail.com wrote:
The following code cannot be compiled
string
I've said it before, but I'll say it again: this is such a common
error that it needs a better error message. Something as simple as
this will do:
foo can't take bar of type char[16]. Try using a slice: bar[].
On 2011-06-11 18:46, Andrej Mitrovic wrote:
I've said it before, but I'll say it again: this is such a common
error that it needs a better error message. Something as simple as
this will do:
foo can't take bar of type char[16]. Try using a slice: bar[].
Have you created an enhancement request
I can't seem to find anything specific like an enhancement request.
Here's a similar report by you:
http://d.puremagic.com/issues/show_bug.cgi?id=4971
Maybe we should have a 'common (newbie) mistakes' section on the
website and add this bit of information there.
On 2011-06-11 19:29, Andrej Mitrovic wrote:
I can't seem to find anything specific like an enhancement request.
Here's a similar report by you:
http://d.puremagic.com/issues/show_bug.cgi?id=4971
Maybe we should have a 'common (newbie) mistakes' section on the
website and add this bit of
On 2011-06-11 19:41, Jonathan M Davis wrote:
On 2011-06-11 19:29, Andrej Mitrovic wrote:
I can't seem to find anything specific like an enhancement request.
Here's a similar report by you:
http://d.puremagic.com/issues/show_bug.cgi?id=4971
Maybe we should have a 'common (newbie)