[Issue 14108] template object.get cannot deduce function from argument types

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 5 20:54:18 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14108

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|---                         |INVALID

--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Timothee Cour from comment #2)
> But why can't a char[] be used here though? Seems to me it would be safe to
> allow that?

Because the associative array does not store a copy of the key, it stores the
key. If the key is mutable, then it could change, and the associative array's
data structure then becomes corrupt.

--


More information about the Digitalmars-d-bugs mailing list