http://d.puremagic.com/issues/show_bug.cgi?id=8613

           Summary: std.typecons.Proxy cannot work with operator 'in'
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: cpun...@gmail.com


--- Comment #0 from Li Jie <cpun...@gmail.com> 2012-09-02 19:20:38 PDT ---
--- code
import std.typecons;

struct Name {
    this(string value) {
        value_ = value;
    }

    mixin Proxy!(value_);

    private string value_;
}

void main() {
    bool[Name] names;
    names[Name("a")] = true;
    bool* b = (Name("a") in names);
}
---

--- compiler output
$ dmd testproxy.d 
/usr/local/Cellar/dmd/2.060/src/phobos/std/typecons.d(2659): Error: cannot
implicitly convert expression (this.value_) of type string to Name
testproxy.d(16): Error: template instance
testproxy.Name.Proxy!(value_).opBinary!("in",Name,bool[Name]) error
instantiating
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to