Fix hash compilation issue for gsl::not_null with shared_ptr

Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-06-02 19:54:22 +00:00
co-authored by carsonRadtke
parent f883a665ee
commit 94759d5250
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ template <class T>
not_null<T> operator+(std::ptrdiff_t, const not_null<T>&) = delete;
template <class T, class U = decltype(std::declval<const T&>().get()), bool = std::is_default_constructible<std::hash<U>>::value>
template <class T, class U = typename T::element_type, bool = std::is_default_constructible<std::hash<U>>::value>
struct not_null_hash
{
std::size_t operator()(const T& value) const { return std::hash<U>{}(value.get()); }