Boost logo

Boost :

Subject: [boost] TR1 hash specialization question
From: Gregory Peele ARA/CFD (gpeele_at_[hidden])
Date: 2009-02-10 12:42:11

Is there a way to specialize the std::tr1::hash functor that works the
same for the boost implementation and the native MSVC 2008 and GCC 4.3
implementations? It appears that the Boost hash_value free function
approach is not supported by the MSVC 2008 implementation, and
specialization of the hash functor template has to occur in the original
namespace of hash, regardless of any using declarations.

Currently I'm using the macro BOOST_HAS_TR1_HASH to decide if I'm using
a "native" TR1 implementation or the boost-provided one, and putting it
in namespace boost vs. namespace std::tr1 based on the decision. This
isn't really a problem, I was just wondering if I had missed an easier

Gregory Peele, Jr.
Applied Research Associates Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at