Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions changelog.dd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ $(BUGSTITLE Library Changes,
in multi-term arithmetic expressions.))
$(LI $(RELATIVE_LINK2 staticIsSorted, Added `std.meta.staticIsSorted` to check if
an `AliasSeq` is sorted according to some template predicate.))
$(LI $(RELATIVE_LINK2 minIndex, Added `std.algorithm.searching.minIndex`
to get the index of the minimum element of a range.))
$(LI $(RELATIVE_LINK2 maxIndex, Added `std.algorithm.searching.maxIndex`
to get the index of the maximum element of a range.))

)

$(BUGSTITLE Library Changes,
Expand Down Expand Up @@ -40,6 +45,32 @@ static assert(!staticIsSorted!(Comp, bool, long, dchar));
minimize such use.)
)

$(LI $(LNAME2 minIndex, `std.algorithm.searching.minIndex` gets the index of
the minimum element of a range, according to a specified predicate. The
default predicate is "a < b")
-------
import std.algorithm.searching : minIndex;
int[] a = [5, 4, 2, 1, 9, 10];
assert(a.minIndex == 3);

int[] a;
assert(a.minIndex == -1);
-------
)

$(LI $(LNAME2 maxIndex, `std.algorithm.searching.maxIndex` gets the index of
the maximum element of a range, according to a specified predicate. The
default predicate is "a > b")
-------
import std.algorithm.searching : maxIndex;
int[] a = [5, 4, 2, 1, 9, 10];
assert(a.minIndex == 5);

int[] a;
assert(a.minIndex == -1);
-------
)

)

Macros:
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.