diff --git a/sprout/functional/hash/hash.hpp b/sprout/functional/hash/hash.hpp index e8d27df4..3adb75c9 100644 --- a/sprout/functional/hash/hash.hpp +++ b/sprout/functional/hash/hash.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace sprout { // @@ -32,6 +33,19 @@ namespace sprout { struct hash : public sprout::hash {}; + template<> + struct hash { + public: + typedef std::size_t result_type; + public: + template + SPROUT_CONSTEXPR std::size_t + operator()(T&& v) + const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::to_hash(sprout::forward(v)))) + { + return sprout::to_hash(sprout::forward(v)); + } + }; #define SPROUT_HASH_SPECIALIZE(type) \ template<> \