diff --git a/rpcs3/util/shared_ptr.hpp b/rpcs3/util/shared_ptr.hpp index 5a2bb1d456..4a8d7ff8e6 100644 --- a/rpcs3/util/shared_ptr.hpp +++ b/rpcs3/util/shared_ptr.hpp @@ -30,13 +30,13 @@ namespace stx } else if constexpr (std::is_convertible_v) { - const auto u = &sample; + const auto u = std::addressof(sample); const volatile void* x = u; return static_cast(u) == x; } else if constexpr (std::is_convertible_v) { - const auto t = &sample; + const auto t = std::addressof(sample); const volatile void* x = t; return static_cast(t) == x; }