https://d.puremagic.com/issues/show_bug.cgi?id=11933
Summary: A range wrapped in a Variant does not work with other
ranges
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2014-01-15 18:24:19 PST ---
import std.stdio;
import std.algorithm;
import std.variant;
import std.range;
//Tested with DMD 2.064.2
void main()
{
auto nums = iota(1, 10_000);
Variant filtered = nums.filter!(n => n % 2 == 0);
//Error: template std.range.take does not match any function template
declaration.
writeln(filtered.take(19).back);
}
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------