ChunkFile: Prevent PointerWrap::Do(T&) from compiling with pointers.

This commit is contained in:
Jordan Woyak
2026-02-10 06:44:36 -06:00
parent 7e60de1cfa
commit 2ba9af9e60
+1 -1
View File
@@ -264,9 +264,9 @@ public:
} }
template <typename T> template <typename T>
requires(std::is_trivially_copyable_v<T> && !std::is_pointer_v<T>)
void Do(T& x) void Do(T& x)
{ {
static_assert(std::is_trivially_copyable_v<T>, "Only sane for trivially copyable types");
// Note: // Note:
// Usually we can just use x = **ptr, etc. However, this doesn't work // Usually we can just use x = **ptr, etc. However, this doesn't work
// for unions containing BitFields (long story, stupid language rules) // for unions containing BitFields (long story, stupid language rules)