Skip to content

Commit

Permalink
Issue 8829 - std.algorithm.find fails to take advantage of SortedRange
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanN7 committed Dec 6, 2016
1 parent 752b2ca commit e4b8250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/algorithm/searching.d
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ if (isForwardRange!R1 && isForwardRange!R2
static if (is(typeof(pred == "a == b")) && pred == "a == b" && isSomeString!R1 && isSomeString!R2
&& haystack[0].sizeof == needle[0].sizeof)
{
//return cast(R1) find(representation(haystack), representation(needle));
// return cast(R1) find(representation(haystack), representation(needle));
// Specialization for simple string search
alias Representation =
Select!(haystack[0].sizeof == 1, ubyte[],
Expand Down

0 comments on commit e4b8250

Please sign in to comment.