AA with immutable values

Jonathan M Davis jmdavisProg at gmx.com
Sun Jun 24 05:21:39 PDT 2012


On Sunday, June 24, 2012 05:15:03 Ali Çehreli wrote:
> Although it sounds like a limitation, it may be due to the fact that AA
> may need to rehash, which may not be suitable with immutable values.

const and immutable types as elements of a container are problematic in 
general. The container generally needs to have been designed with them in mind 
for them to work properly - especially in D, where const and immutable are 
very strict, and you're not supposed to be mutating them even through casts.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list