Why does
@safe pure unittest
{
import std.algorithm.searching : findSplit;
if (const split = "a b".findSplit(" "))
{
}
}
error as
f.d(4,5): Error: mutable method
`std.algorithm.searching.findSplit!("a == b", string,
string).findSplit.Result!(string,
string).Result.opCast!bool
On Monday, 5 November 2018 at 13:26:18 UTC, Per Nordlöw wrote:
AFAICT, it looks like a missing bool qualifier on
`opCast!bool`, right?
...Like a missing 'const' qualifier ;)
auto findSplit(alias pred = "a == b", R1, R2)(R1 haystack, R2
needle)
// ...
static struct Result(S1, S2) if (isF
On Monday, 5 November 2018 at 13:26:18 UTC, Per Nordlöw wrote:
AFAICT, it looks like a missing bool qualifier on
`opCast!bool`, right?
Fixed at
https://github.com/dlang/phobos/pull/6749
On 2018-11-05 14:26, Per Nordlöw wrote:
Why does
@safe pure unittest
{
import std.algorithm.searching : findSplit;
if (const split = "a b".findSplit(" "))
{
}
}
error as
f.d(4,5): Error: mutable method `std.algorithm.searching.findSplit!("a
== b", string, string).findSplit