Custom hash table key is const, how to call dtors?

Marco Leise via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 5 14:18:50 PST 2016


Usually I want the keys to be declared "immutable" to signal
that their content must not change in order to provide stable
hashes. But when you remove items from the table you need to
call a const/immutable dtor that needs to be written for
everything that can be a hash table key.

What do you put into such a const/immutable dtor?
How do others deal with this?

-- 
Marco



More information about the Digitalmars-d-learn mailing list