[Issue 11842] New: Operator overloading of mixin templates
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Dec 29 13:50:57 PST 2013
    
    
  
https://d.puremagic.com/issues/show_bug.cgi?id=11842
           Summary: Operator overloading of mixin templates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-12-29 23:50:54 EET ---
This code ought to work:
mixin template M()
{
    bool opIn_r(int i) { return true; }
}
struct S
{
    mixin M m;
}
void main()
{
    S s;
    assert(5 in s.m);
}
-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list