mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-28 18:41:57 -05:00
Merge pull request #913 from jwakely/notnull_hash
Pass correct value to std::hash
This commit is contained in:
commit
6aa755e9ce
@ -177,7 +177,7 @@ namespace std
|
||||
template <class 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
|
||||
@ -280,7 +280,7 @@ namespace std
|
||||
template <class 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
|
||||
|
Loading…
Reference in New Issue
Block a user