Merge pull request #913 from jwakely/notnull_hash

Pass correct value to std::hash
This commit is contained in:
Jordan Maples [MSFT] 2020-08-20 15:32:22 -07:00 committed by GitHub
commit 6aa755e9ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ namespace std
template <class T> template <class T>
struct hash<gsl::not_null<T>> struct hash<gsl::not_null<T>>
{ {
std::size_t operator()(const gsl::not_null<T>& value) const { return hash<T>{}(value); } std::size_t operator()(const gsl::not_null<T>& value) const { return hash<T>{}(value.get()); }
}; };
} // namespace std } // namespace std
@ -280,7 +280,7 @@ namespace std
template <class T> template <class T>
struct hash<gsl::strict_not_null<T>> struct hash<gsl::strict_not_null<T>>
{ {
std::size_t operator()(const gsl::strict_not_null<T>& value) const { return hash<T>{}(value); } std::size_t operator()(const gsl::strict_not_null<T>& value) const { return hash<T>{}(value.get()); }
}; };
} // namespace std } // namespace std