Overload hash_value for non-constant arrays.

[SVN r28276]
This commit is contained in:
Daniel James
2005-04-16 10:32:29 +00:00
parent 86d76f397d
commit 3bb76776e6

View File

@@ -23,7 +23,6 @@
#include <boost/limits.hpp>
#include <boost/functional/detail/float_functions.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/call_traits.hpp>
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)