From 1814f98a27dcb30fac1c971d7c19e886ee28803e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 28 Feb 2006 00:49:14 +0000 Subject: [PATCH] Reintroduce workaround for hashing const built-in array on Visual C++. [SVN r33164] --- include/boost/functional/hash/hash.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 0cd77ab..3f3b62e 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -422,7 +422,11 @@ namespace boost template struct inner { +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) static std::size_t call(Array const& v) +#else + static std::size_t call(Array& v) +#endif { const int size = sizeof(v) / sizeof(*v); return boost::hash_range(v, v + size); @@ -503,7 +507,7 @@ namespace boost { std::size_t operator()(T const& val) const { - return hash_detail::call_hash::call(val); + return hash_detail::call_hash::call(val); } std::size_t operator()(T& val) const @@ -520,7 +524,7 @@ namespace boost struct inner : public std::unary_function { - std::size_t operator()(T const& val) const + std::size_t operator()(T& val) const { return hash_detail::call_hash::call(val); }