Chris@102: /*============================================================================= Chris@102: Copyright (c) 2014 Christoph Weiss Chris@102: Chris@102: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@102: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: ==============================================================================*/ Chris@102: #if !defined(FUSION_HASH_23072014_1017) Chris@102: #define FUSION_HASH_23072014_1017 Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { namespace fusion Chris@102: { Chris@102: namespace hashing Chris@102: { Chris@102: struct hash_combine_fold Chris@102: { Chris@102: typedef std::size_t result_type; Chris@102: template Chris@102: inline std::size_t operator()(std::size_t seed, T const& v) Chris@102: { Chris@102: boost::hash_combine(seed, v); Chris@102: return seed; Chris@102: } Chris@102: }; Chris@102: Chris@102: template Chris@102: inline typename Chris@102: boost::enable_if, std::size_t>::type Chris@102: hash_value(Seq const& seq) Chris@102: { Chris@102: return fold(seq, 0, hash_combine_fold()); Chris@102: } Chris@102: } Chris@102: Chris@102: using hashing::hash_value; Chris@102: }} Chris@102: Chris@102: #endif