mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 05:54:29 +02:00
Overload hash_value for non-constant arrays.
[SVN r28276]
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user