Skip to content

Commit

Permalink
reflexive vs symmetric in hash_table.h doc (#1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmklix authored Sep 8, 2023
1 parent 1ac9e0c commit 2f8f082
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/aws/common/hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ typedef uint64_t(aws_hash_fn)(const void *key);
* keys, but note that the same type is used for a function that compares
* two hash table values in aws_hash_table_eq.
*
* Equality functions used in a hash table must be reflexive (i.e., a == b if
* and only if b == a), and must be consistent with the hash function in use.
* Equality functions used in a hash table must be be reflexive (a == a),
* symmetric (a == b => b == a), transitive (a == b, b == c => a == c)
* and consistent (result does not change with time).
*/
typedef bool(aws_hash_callback_eq_fn)(const void *a, const void *b);

Expand Down

0 comments on commit 2f8f082

Please sign in to comment.