mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
change addressof traits
This commit is contained in:
parent
b3ce7296da
commit
e5637554d1
3 changed files with 56 additions and 61 deletions
|
@ -8,6 +8,7 @@
|
|||
#ifndef SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP
|
||||
#define SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/workaround/std/cstddef.hpp>
|
||||
#include <sprout/functional/hash/hash_fwd.hpp>
|
||||
|
@ -17,7 +18,7 @@ namespace sprout {
|
|||
// to_hash
|
||||
//
|
||||
// effect:
|
||||
// sprout::hash_value_traits<T>::hash_value(v)
|
||||
// sprout::hash_value_traits<typename std::remove_reference<T>::type>::hash_value(v)
|
||||
// [default]
|
||||
// ADL callable hash_value(v) -> hash_value(v)
|
||||
// [default]
|
||||
|
@ -27,7 +28,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR std::size_t
|
||||
to_hash(T&& v) {
|
||||
return sprout::hash_value_traits<T>::hash_value(v);
|
||||
return sprout::hash_value_traits<typename std::remove_reference<T>::type>::hash_value(v);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue