www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11933] New: A range wrapped in a Variant does not work with other ranges

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: nobody puremagic.com
        ReportedBy: monkeyworks12 hotmail.com


--- Comment #0 from monkeyworks12 hotmail.com 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: -------
Jan 15 2014