Skip to content

Instantly share code, notes, and snippets.

View jendas1's full-sized avatar

Jan Studený jendas1

  • Aalto University, Finland
  • Espoo, Finland
View GitHub Profile
@nsuke
nsuke / tuple_hash.h
Created July 13, 2013 12:48
std::hash specialization for std::tuple from StackOverflow.com
#ifndef common_tuple_hash_h
#define common_tuple_hash_h
#include <tuple>
namespace std{
namespace
{
template <class t>
inline void hash_combine(std::size_t& seed, t const& v)
{
seed ^= hash<t>()(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);