March 16, 2013 [Issue 9734] New: setIntersection accepts only 2 ranges, but documentation says otherwise | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9734 Summary: setIntersection accepts only 2 ranges, but documentation says otherwise Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody@puremagic.com ReportedBy: josvanuden@gmail.com --- Comment #0 from josvanuden@gmail.com 2013-03-16 03:18:26 PDT --- std.algorithm.setIntersection only accepts 2 ranges, although the documentation says it accepts 2 or more. There's a static assert in the code that limits the input to 2 ranges. Even the example on the webpage doesn't compile: int[] a = [ 1, 2, 4, 5, 7, 9 ]; int[] b = [ 0, 1, 2, 4, 7, 8 ]; int[] c = [ 0, 1, 4, 5, 7, 8 ]; assert(equal(setIntersection(a, a), a)); assert(equal(setIntersection(a, b), [1, 2, 4, 7][])); assert(equal(setIntersection(a, b, c), [1, 4, 7][])); (...)\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(10076): Error: static assert (3u == 2u) is false (...)\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(10150): instantiated from here: SetIntersection!("a < b", int[], int[], int[]) test.d(16): instantiated from here: setIntersection!("a < b", int[],int[],int[]) Whether this limitation is temporary or permanent, I think the docs should indicate that you cannot (for now) input more than 2 ranges. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 27, 2013 [Issue 9734] setIntersection accepts only 2 ranges, but documentation says otherwise | ||||
---|---|---|---|---|
| ||||
Posted in reply to josvanuden@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=9734 jens.k.mueller@gmx.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jens.k.mueller@gmx.de --- Comment #1 from jens.k.mueller@gmx.de 2013-05-27 03:59:31 PDT --- I just found this out as well. Can you update the documentation? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation