diff --git a/Include/Aurora/Memory/CppHeapWrapper.hpp b/Include/Aurora/Memory/CppHeapWrapper.hpp index 04c8f2b0..672a80ac 100644 --- a/Include/Aurora/Memory/CppHeapWrapper.hpp +++ b/Include/Aurora/Memory/CppHeapWrapper.hpp @@ -237,12 +237,29 @@ namespace Aurora::Memory #endif } + template + bool operator==(const Aurora::Memory::PmrCppHeapWrapper &rhs) noexcept + { + return this->GetHeapRaw() == rhs.GetHeapRaw(); + } + + template + bool operator!=(const Aurora::Memory::PmrCppHeapWrapper &rhs) noexcept + { + return this->GetHeapRaw() == rhs.GetHeapRaw(); + } template bool operator==(const Aurora::Memory::CppHeapWrapper &rhs) noexcept { return this->GetHeapRaw() == rhs.GetHeapRaw(); } + template + bool operator!=(const Aurora::Memory::CppHeapWrapper &rhs) noexcept + { + return this->GetHeapRaw() == rhs.GetHeapRaw(); + } + private: #if defined(AU_NO_COMPRESS_CPPHEAP_WRAPPER) mutable std::shared_ptr spHeap; @@ -251,6 +268,8 @@ namespace Aurora::Memory mutable std::shared_ptr spHeap; #endif + template + friend struct PmrCppHeapWrapper; friend struct detail::AccessorICantEven; }; @@ -562,7 +581,9 @@ namespace Aurora::Memory #endif mutable CppHeapWrapper *pFuckCppRetardsFixYourWorthlessSpec {}; mutable CppHeapWrapper *pFuckCppRetardsFixYourWorthlessSpec2 {}; - + + template + friend struct CppHeapWrapper; friend struct detail::AccessorICantEven; }; } @@ -579,4 +600,17 @@ inline bool operator==(const Aurora::Memory::PmrCppHeapWrapper &lhs, const Aurora::Memory::PmrCppHeapWrapper &rhs) noexcept { return lhs.GetHeapRaw() == rhs.GetHeapRaw(); +} +template +inline bool operator!=(const Aurora::Memory::CppHeapWrapper &lhs, + const Aurora::Memory::CppHeapWrapper &rhs) noexcept +{ + return lhs.GetHeapRaw() != rhs.GetHeapRaw(); +} + +template +inline bool operator!=(const Aurora::Memory::PmrCppHeapWrapper &lhs, + const Aurora::Memory::PmrCppHeapWrapper &rhs) noexcept +{ + return lhs.GetHeapRaw() != rhs.GetHeapRaw(); } \ No newline at end of file