added HashSet::operator[]() const

- can use the same syntax for boolList, PackedBoolList and labelHashSet
    if (myHashedSet[x]) ...
    if (myBoolList[x]) ...
    if (myPackedList[x]) ...
This commit is contained in:
Mark Olesen
2009-01-27 21:55:03 +01:00
parent c048dd88c7
commit c6e9b323f5
3 changed files with 37 additions and 1 deletions

View File

@ -133,9 +133,11 @@ public:
return HashTable<nil, Key, Hash>::insert(key, nil());
}
// Member Operators
//- Return true if the entry exists, same as found()
inline bool operator[](const Key&) const;
//- Equality. Two hashtables are equal when their contents are equal.
// Independent of table size or order.
bool operator==(const HashSet<Key, Hash>&) const;