mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
Misc: Replace deprecated std::is_pod
This commit is contained in:
parent
a66fec4266
commit
519367555b
|
@ -54,7 +54,7 @@ public:
|
|||
return ref;
|
||||
}
|
||||
|
||||
template<class Y = T, std::enable_if_t<std::is_pod_v<Y>, int> = 0>
|
||||
template<class Y = T, std::enable_if_t<std::is_standard_layout_v<Y> && std::is_trivial_v<Y>, int> = 0>
|
||||
T& Push(const T& value)
|
||||
{
|
||||
T& ref = PushAndGetReference();
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
return ref;
|
||||
}
|
||||
|
||||
template<class Y = T, std::enable_if_t<!std::is_pod_v<Y>, int> = 0>
|
||||
template<class Y = T, std::enable_if_t<!std::is_standard_layout_v<Y> || !std::is_trivial_v<Y>, 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<class Y = T, std::enable_if_t<std::is_pod_v<Y>, int> = 0>
|
||||
template<class Y = T, std::enable_if_t<std::is_standard_layout_v<Y>&& std::is_trivial_v<Y>, int> = 0>
|
||||
void PushRange(const T* data, u32 size)
|
||||
{
|
||||
DebugAssert((m_size + size) <= CAPACITY);
|
||||
|
@ -91,7 +91,7 @@ public:
|
|||
m_size += size;
|
||||
}
|
||||
|
||||
template<class Y = T, std::enable_if_t<!std::is_pod_v<Y>, int> = 0>
|
||||
template<class Y = T, std::enable_if_t<!std::is_standard_layout_v<Y> || !std::is_trivial_v<Y>, int> = 0>
|
||||
void PushRange(const T* data, u32 size)
|
||||
{
|
||||
DebugAssert((m_size + size) <= CAPACITY);
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
}
|
||||
|
||||
/// Overload for POD types, such as structs.
|
||||
template<typename T, std::enable_if_t<std::is_pod_v<T>, int> = 0>
|
||||
template<typename T, std::enable_if_t<std::is_standard_layout_v<T> && std::is_trivial_v<T>, int> = 0>
|
||||
void DoPOD(T* value_ptr)
|
||||
{
|
||||
if (m_mode == Mode::Read)
|
||||
|
|
Loading…
Reference in a new issue