diff --git a/src/common/fifo_queue.h b/src/common/fifo_queue.h index 6989b4f39..7ccbaf109 100644 --- a/src/common/fifo_queue.h +++ b/src/common/fifo_queue.h @@ -54,7 +54,7 @@ public: return ref; } - template, int> = 0> + template && std::is_trivial_v, int> = 0> T& Push(const T& value) { T& ref = PushAndGetReference(); @@ -62,7 +62,7 @@ public: return ref; } - template, int> = 0> + template || !std::is_trivial_v, int> = 0> T& Push(const T& value) { T& ref = PushAndGetReference(); @@ -71,7 +71,7 @@ public: } // faster version of push_back_range for POD types which can be memcpy()ed - template, int> = 0> + template&& std::is_trivial_v, int> = 0> void PushRange(const T* data, u32 size) { DebugAssert((m_size + size) <= CAPACITY); @@ -91,7 +91,7 @@ public: m_size += size; } - template, int> = 0> + template || !std::is_trivial_v, int> = 0> void PushRange(const T* data, u32 size) { DebugAssert((m_size + size) <= CAPACITY); diff --git a/src/util/state_wrapper.h b/src/util/state_wrapper.h index 6c2b1eb55..ed4d2ef52 100644 --- a/src/util/state_wrapper.h +++ b/src/util/state_wrapper.h @@ -74,7 +74,7 @@ public: } /// Overload for POD types, such as structs. - template, int> = 0> + template && std::is_trivial_v, int> = 0> void DoPOD(T* value_ptr) { if (m_mode == Mode::Read)