Skip to content

Commit f47f534

Browse files
authored
Merge pull request #4246 from fieldvoid/patch-1
Update hash-map.dd
2 parents abb8043 + a0e29da commit f47f534

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/hash-map.dd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ $(H2 $(LNAME2 testing_membership, Testing Membership))
8181

8282
$(H2 $(LNAME2 using_classes_as_key, Using Classes as the KeyType))
8383

84-
$(P Classes can be used as the $(I KeyType). For this to work,
85-
the class definition must override the following member functions
84+
$(P Classes can be used as the $(I KeyType). The behavior is controlled by the following member functions
8685
of class $(D Object):)
8786

8887
$(UL
@@ -109,6 +108,8 @@ $(H2 $(LNAME2 using_classes_as_key, Using Classes as the KeyType))
109108
}
110109
}
111110
---
111+
The default implementation of $(D opEquals) uses the address of the instance for comparisons,
112+
and the default implementation of $(D toHash) hashes the address of the instance.
112113

113114
$(IMPLEMENTATION_DEFINED
114115
`opCmp` is not used to check for equality by the

0 commit comments

Comments
 (0)