On Wed, 26 Oct 2011, Ioannis Papadopoulos wrote:
Hi,
In graph/detail/adjacency_list.hpp:2766 there is a specialization of struct hash for void*. Isn't the generic pointer specialization in functional/hash/extensions.hpp:172 enough?
The problem I am facing is the following (which I couldn't reproduce in a trivial example):
1. I include
and 2. I create an std::tr1::unordered_map and typedef std::tr1::unordered_map ::iterator iterator_type; 3. In some test file that includes and uses it, I get the following error (gcc 4.4.5/4.6.1): /usr/local/include/boost/graph/detail/adjacency_list.hpp:2766: error: specialization of ‘boost::hash ’ after instantiation /usr/local/include/boost/graph/detail/adjacency_list.hpp:2766: error: redefinition of ‘struct boost::hash ’ /usr/local/usr/include/boost/functional/hash/extensions.hpp:172: error: previous definition of ‘struct boost::hash ’ I can resolve it by providing my own hash functor to the unordered_map (which causes hash
not to be instantiated). I will keep trying to provide a trivial example.
I have removed that from the trunk (boost::hash always provides that
specialization now). See if that helps (if you don't want to get the
trunk version, the only change is removing the hash