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
|
namespace utils
|
||||||
{
|
{
|
||||||
// Hack. Pointer cast util to workaround UB. Use with extreme care.
|
// Hack. Pointer cast util to workaround UB. Use with extreme care.
|
||||||
template <typename T, typename U>
|
template <typename T, typename U> requires requires () { +reinterpret_cast<T*>(static_cast<const U&>(nullptr)); }
|
||||||
[[nodiscard]] T* bless(U* ptr)
|
[[nodiscard]] inline T* bless(const U& ptr)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
return (T*)ptr;
|
return (T*)ptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue