Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multi-arg opApply/range for each.
std.algorithm.iteration.each can now be called with a lambda taking >2 args. This should work for any input range that returns a tuple and any type with a non-templated opApply that takes a multi-arg delegate. Determining the arity of a templated opApply still poses a problem, so that case is not supported. This also adds support for `each` with two ref args. When given a binary function that takes two args by ref, std.algorithm.iteration.each should use both args by ref. It was previously discarding ref on the first arg, assuming it was for an index. Resolves #15358.
- Loading branch information
Showing
1 changed file
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters