[Issue 2729] hash_t undocumented and unnecessary
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 11 22:02:40 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2729
------- Comment #1 from jlquinn at optonline.net 2009-03-12 00:02 -------
Additionally, the requirements for user-defined hashing for structs and classes
are inconsistent.
First, struct requirements are listed as needing 2 members:
const uint toHash()
const int opCmp(Keytype*)
Later, struct requirements are given again, but this time:
hash_t toHash()
bool opEquals(S) or bool opEquals(S*)
int opCmp(S) or int opCmp(S*)
Classes are supposed to match the 2nd set of functions.
Shouldn't these functions be const? And S should be replaced by "Keytype" or
the text above should state that S is a Keytype.
--
More information about the Digitalmars-d-bugs
mailing list