Common/BitCastPtr: Prevent destination type to be a pointer

This commit is contained in:
Sepalani
2026-08-05 00:15:16 +04:00
parent 66d8a89220
commit 6496d6c0c9
+1
View File
@@ -137,6 +137,7 @@ public:
"BitCastPtr source type must be trivially copyable."); "BitCastPtr source type must be trivially copyable.");
static_assert(std::is_trivially_copyable<T>(), static_assert(std::is_trivially_copyable<T>(),
"BitCastPtr destination type must be trivially copyable."); "BitCastPtr destination type must be trivially copyable.");
static_assert(!std::is_pointer<T>(), "BitCastPtr destination type must not be a pointer.");
explicit BitCastPtrType(PtrType* ptr) : m_ptr(ptr) {} explicit BitCastPtrType(PtrType* ptr) : m_ptr(ptr) {}