diff --git a/src/Common/MemPtr.h b/src/Common/MemPtr.h index d1638218..73fcb3ef 100644 --- a/src/Common/MemPtr.h +++ b/src/Common/MemPtr.h @@ -121,8 +121,8 @@ class MEMPTR : MEMPTRBase return *this; } - template - std::enable_if_t, Q>& operator*() const noexcept + template requires (!std::is_void_v) + Q& operator*() const noexcept { return *GetPtr(); } @@ -132,8 +132,8 @@ class MEMPTR : MEMPTRBase return GetPtr(); } - template - std::enable_if_t, Q>& operator[](int index) noexcept + template requires (!std::is_void_v) + Q& operator[](int index) noexcept { return GetPtr()[index]; }