std::hash support for gsl::not_null.

This commit is contained in:
Samuel García Salas committed 2015-10-17 08:53:58 +02:00
1 parent c973e82dff
commit a544ada8fe
1 file changed
+13
+13
View File
@@ -197,6 +197,19 @@ private:
} // namespace gsl
namespace std
{
template<class T>
struct hash<gsl::not_null<T *>>
{
size_t operator()(const gsl::not_null<T *> & value) const
{
return hash<T *>{}(value);
}
};
} // namespace std
#ifdef _MSC_VER
#undef constexpr