From 3bb76776e61e3b63fe59a119b68c73f923856137 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 16 Apr 2005 10:32:29 +0000 Subject: [PATCH] Overload hash_value for non-constant arrays. [SVN r28276] --- include/boost/functional/hash/hash.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index f6249ce..1ee6bf9 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -23,7 +23,6 @@ #include #include #include -#include namespace boost { @@ -48,6 +47,9 @@ namespace boost #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) template< class T, unsigned N > std::size_t hash_value(const T (&array)[N]); + + template< class T, unsigned N > + std::size_t hash_value(T (&array)[N]); #endif std::size_t hash_value(float v); @@ -238,6 +240,12 @@ namespace boost { return hash_range(array, array+N); } + + template< class T, unsigned N > + inline std::size_t hash_value(T (&array)[N]) + { + return hash_range(array, array+N); + } #endif #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)