www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11798] New: std.algorithm.all with no predicate too

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11798

           Summary: std.algorithm.all with no predicate too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-12-22 04:44:12 PST ---
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 };

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11798


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra gmail.com
         AssignedTo|nobody puremagic.com        |monarchdodra gmail.com


--- Comment #1 from monarchdodra gmail.com 2013-12-22 14:09:32 PST ---
Seems like a legit request to me, and is trivial to implement. I'm on it. ditto
for "any" of course :)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11798



--- Comment #2 from monarchdodra gmail.com 2013-12-23 09:38:21 PST ---
https://github.com/D-Programming-Language/phobos/pull/1810

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 23 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11798



--- Comment #3 from github-bugzilla puremagic.com 2013-12-27 22:15:27 PST ---
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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 27 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11798


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 28 2013