Why I can't call toHash in const context?

Borislav Kosharov bosak at gmail.com
Tue Aug 6 11:44:51 PDT 2013


On Tuesday, 6 August 2013 at 18:18:43 UTC, Peter Alexander wrote:
> On Tuesday, 6 August 2013 at 18:14:29 UTC, Borislav Kosharov 
> wrote:
>> Am I missing something?
>
> It's a long story :-)
>
> Issue 1824 - Object not const correct
> http://d.puremagic.com/issues/show_bug.cgi?id=1824
>
> Issue 9771 - Remove toHash from Object
> http://d.puremagic.com/issues/show_bug.cgi?id=9771
>
> http://forum.dlang.org/thread/jtlj1k$1fdj$1@digitalmars.com#post-jtlj1k:241fdj:241:40digitalmars.com

Also what is the way of calculating hashes for basic types like 
int and string. Those types don't inherit from Object, right? Is 
there some std function like hash(T)(T value) that is universal 
or something?


More information about the Digitalmars-d mailing list