Merge pull request #14798 from sepalani/bitcast-noptr

Common/BitCastPtr: Prevent destination type to be a pointer
This commit is contained in:
Scott Mansell
2026-08-07 14:55:50 +12:00
committed by GitHub
+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) {}