Boost logo

Boost :

Subject: Re: [boost] TR1 hash specialization question
From: John Maddock (john_at_[hidden])
Date: 2009-02-11 03:47:21

> 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
> way.

Unfortunately I believe that's the only way,


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