[Issue 19197] Replace instances of typeid(T).getHash(..) with hashOf

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 21 12:02:57 UTC 2018


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

--- Comment #1 from Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> ---
(In reply to ZombineDev from comment #0)
> Since core.internal.hash.hashOf is a template, there are a number potential
> benefits:
> * better performance (e.g. more opportunities for inlining, less
> indirections for value types)
> * less dependence on TypeInfo (which we want to phase out in the long term)
> * -betterC friendly (no need to link druntime and phobos to your library /
> app, in order to use simple templates like std.typecons.Nullable)

I have started working on this but when I change typeid(T).getHash(..) to
hashOf at line 2682 the unittest is failing. Is the return of the hashOf
different that the one for the one for the typeid(T).getHash(..)?

--


More information about the Digitalmars-d-bugs mailing list