[Issue 3234] New: Range comparison with array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 7 15:56:33 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3234
Summary: Range comparison with array
Product: D
Version: 2.029
Platform: Other
URL: http://www.digitalmars.com/d/2.0/phobos/std_algorithm.
html#filter
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: Jesse.K.Phillips+D at gmail.com
CC: Jesse.K.Phillips+D at gmail.com
Comparisons between a range and a static array gave error.
The error received is:
Error: incompatible types for ((small) == ([1,2])): 'Filter!(result,int[])'
and 'int[2u]'
Example code provided by std.algorithms webpage:
import std.algorithm;
void main() {
int[] arr = [ 1, 2, 3, 4, 5 ];
// Sum all elements
auto small = filter!("a < 3")(arr);
assert(small == [ 1, 2 ]);
}
--
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