mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 14:04:27 +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/limits.hpp>
|
||||||
#include <boost/functional/detail/float_functions.hpp>
|
#include <boost/functional/detail/float_functions.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
#include <boost/call_traits.hpp>
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@@ -48,6 +47,9 @@ namespace boost
|
|||||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
|
||||||
template< class T, unsigned N >
|
template< class T, unsigned N >
|
||||||
std::size_t hash_value(const T (&array)[N]);
|
std::size_t hash_value(const T (&array)[N]);
|
||||||
|
|
||||||
|
template< class T, unsigned N >
|
||||||
|
std::size_t hash_value(T (&array)[N]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::size_t hash_value(float v);
|
std::size_t hash_value(float v);
|
||||||
@@ -238,6 +240,12 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return hash_range(array, array+N);
|
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
|
#endif
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||||
|
Reference in New Issue
Block a user