mirror of
https://github.com/microsoft/GSL.git
synced 2025-03-31 00:41:15 -04:00
Merge pull request #147 from samuel3/master
std::hash support for gsl::not_null.
This commit is contained in:
commit
1e36db9695
@ -197,6 +197,19 @@ private:
|
|||||||
|
|
||||||
} // namespace gsl
|
} // 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
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#undef constexpr
|
#undef constexpr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user