mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
Fix possible ambiguity of utils::bless
This commit is contained in:
parent
41aaa912e7
commit
c9d57e8e80
|
|
@ -3,8 +3,8 @@
|
|||
namespace utils
|
||||
{
|
||||
// Hack. Pointer cast util to workaround UB. Use with extreme care.
|
||||
template <typename T, typename U>
|
||||
[[nodiscard]] T* bless(U* ptr)
|
||||
template <typename T, typename U> requires requires () { +reinterpret_cast<T*>(static_cast<const U&>(nullptr)); }
|
||||
[[nodiscard]] inline T* bless(const U& ptr)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return (T*)ptr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue