From d9f913016cbbdc32ce43ac02f4e0ef6a8ffd1ae4 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Thu, 27 Nov 2025 02:50:45 +0200 Subject: [PATCH] Fix possible ambiguity of utils::bless (#17757) Make utils::bless at util/bless.hpp argument type be complete, avoiding possible ambiguity with RSX-utility version. A fix for Apple Clang compiler. --- rpcs3/util/bless.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/util/bless.hpp b/rpcs3/util/bless.hpp index af2f8d32f3..6a097a2c64 100644 --- a/rpcs3/util/bless.hpp +++ b/rpcs3/util/bless.hpp @@ -1,10 +1,12 @@ #pragma once +#include + namespace utils { // Hack. Pointer cast util to workaround UB. Use with extreme care. - template - [[nodiscard]] T* bless(U* ptr) + template requires (std::is_pointer_v>) + [[nodiscard]] inline T* bless(const U& ptr) { #ifdef _MSC_VER return (T*)ptr; @@ -21,3 +23,4 @@ namespace utils #endif } } +