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


Michael Rynn <y0uf00...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y0uf00...@gmail.com


--- Comment #2 from Michael Rynn <y0uf00...@gmail.com> 2009-12-16 12:59:21 PST 
---
Its not adding just opAssign. Having post-blit in a struct can do it too.
Documentation on struct in Associative Arrays in D2 is out of date.  Probably
because it mostly does not work. To return a pointer to the struct have to take
address of this



struct pblit {
     int x;

     pblit* opAssign(ref const pblit S)
     {
         this.x = S.x;

     }

     this(this)
     {
     }
     ~this()
     {
     }
} 

void main(char[][] args)
{
    pblit[string]   map;
    string[pblit]   rmap;

    pblit val;
    val.x = 12;

    rmap[val] = "test";   // this works
    map["test"] = val;    // oops! range error
}

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

Reply via email to