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
commit 430138f468
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,6 +137,7 @@ public:
"BitCastPtr source type must be trivially copyable.");
static_assert(std::is_trivially_copyable<T>(),
"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) {}