boost::hash is implemented by calling
the function hash_value.
The namespace isn't specified so that it can detect overloads via argument
dependant lookup. So if there is a free function hash_value
in the same namespace as a custom type, it will get called.

If you have a structure library::book, where
each book is uniquely defined
by it's member id:

When writing a hash function, first look at how the equality function works.
Objects that are equal must generate the same hash value. When objects are
not equal they should generate different hash values. In this object equality
was based just on the id so the hash function only hashes the id. If it was
based on the object's name and author then the hash function should take
them into account (how to do this is discussed in the next section).