Error: cannot deduce function from argument types
Sisor
smietzner at yahoo.de
Sat May 5 17:19:25 UTC 2018
On Saturday, 5 May 2018 at 17:06:13 UTC, Neia Neutuladh wrote:
> On Saturday, 5 May 2018 at 16:42:12 UTC, Sisor wrote:
>> Error: template std.string.stripRight cannot deduce function
>> from argument types
>
> You used
> http://dpldocs.info/experimental-docs/std.string.stripRight.html
>
> This function only takes one argument and strips whitespace.
>
> You want
> http://dpldocs.info/experimental-docs/std.algorithm.mutation.stripRight.1.html
>
> This function can take two arguments and strips the second from
> the first.
https://dlang.org/phobos/std_string.html#.stripRight has an
overload with a second argument.
The std.algorithm.mutation version does only work with my second
solution, which solves the problem. So thanks!
But I still don't understand the problem.
More information about the Digitalmars-d-learn
mailing list