[Issue 7948] std.range.zip broken with requireSameLength

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 21 13:17:35 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7948


SomeDude <lovelydear at mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear at mailmetrash.com


--- Comment #1 from SomeDude <lovelydear at mailmetrash.com> 2012-04-21 13:18:33 PDT ---
For convenience, same code as above:

import std.algorithm;                                                       
import std.range; 

void main(){                                                          
    int[] a = [ 1, 2, 3 ];                                                      
    string[] b = [ "a", "b", "c" ];                                             
    sort!("a[0] > b[0]")(zip(StoppingPolicy.requireSameLength, a, b));          
    assert(a == [ 3, 2, 1 ]);                                                   
    assert(b == [ "c", "b", "a" ]);    
}

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


More information about the Digitalmars-d-bugs mailing list