Hash.hpp #1

  • //
  • mainline/
  • guest/
  • ShadauxCat/
  • Sprawl/
  • Mainline/
  • collections/
  • hashmap/
  • Hash.hpp
  • View
  • Commits
  • Open Download .zip Download (402 B)
#pragma once
//Temporary to get hold of std::hash until this is fully implemented
#include <unordered_map>
#include <type_traits>

namespace sprawl
{
	template<typename T>
	class Hash
	{
	public:
		typedef typename std::remove_const<typename std::remove_reference<T>::type>::type adjusted_type;

		inline static size_t Compute(T const& value)
		{
			return std::hash<adjusted_type>()(value);
		}
	};
}
# Change User Description Committed
#1 11496 ShadauxCat Initial checkin: Current states for csbuild and libSprawl