Bug 11798 – std.algorithm.all with no predicate too

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-22T04:44:00Z
Last change time
2013-12-28T02:20:51Z
Assigned to
monarchdodra
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-12-22T04:44:12Z
I suggest to add an overload to std.algorithm.all, that works with no predicate: void main() { import std.algorithm: all; auto bools = [true, false, true]; auto result = bools.all; } Currently you have to write code like: auto result = bools.all!q{ a };
Comment #1 by monarchdodra — 2013-12-22T14:09:32Z
Seems like a legit request to me, and is trivial to implement. I'm on it. ditto for "any" of course :)
Comment #2 by monarchdodra — 2013-12-23T09:38:21Z
Comment #3 by github-bugzilla — 2013-12-27T22:15:27Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/1fbfd9f46545a2b696cf3352b22e94ab4f9c17f1 fix Issue 11798 - std.algorithm.all with no predicate too https://github.com/D-Programming-Language/phobos/commit/2eab18036284ba262a5b20ec0446271bbb78693e Merge pull request #1810 from monarchdodra/allAny fix Issue 11798 - std.algorithm.all with no predicate too