While the associative containers use an ordering relation to specify how the
elements are stored, the unordered associative containers use an equality predicate
and a hash function. For example, boost::unordered_map
is declared as:

If you wish to use a different equality function, you will also need to use
a matching hash function. For example, to implement a case insensitive dictionary
you need to define a case insensitive equality predicate and hash function:

Be careful when using the equality (==)
operator with custom equality predicates, especially if you're using a function
pointer. If you compare two containers with different equality predicates
then the result is undefined. For most stateless function objects this is
impossible - since you can only compare objects with the same equality predicate
you know the equality predicates must be equal. But if you're using function
pointers or a stateful equality predicate (e.g. boost::function) then you
can get into trouble.

See the Boost.Hash documentation for more
detail on how to do this. Remember that it relies on extensions to the draft
standard - so it won't work on other implementations of the unordered associative
containers.