|
|
@ -54,7 +54,7 @@ public:
|
|
|
|
return ref;
|
|
|
|
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& Push(const T& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
T& ref = PushAndGetReference();
|
|
|
|
T& ref = PushAndGetReference();
|
|
|
@ -62,7 +62,7 @@ public:
|
|
|
|
return ref;
|
|
|
|
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& Push(const T& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
T& ref = PushAndGetReference();
|
|
|
|
T& ref = PushAndGetReference();
|
|
|
@ -71,7 +71,7 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// faster version of push_back_range for POD types which can be memcpy()ed
|
|
|
|
// 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)
|
|
|
|
void PushRange(const T* data, u32 size)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DebugAssert((m_size + size) <= CAPACITY);
|
|
|
|
DebugAssert((m_size + size) <= CAPACITY);
|
|
|
@ -91,7 +91,7 @@ public:
|
|
|
|
m_size += size;
|
|
|
|
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)
|
|
|
|
void PushRange(const T* data, u32 size)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DebugAssert((m_size + size) <= CAPACITY);
|
|
|
|
DebugAssert((m_size + size) <= CAPACITY);
|
|
|
|