replace is_pod with is_standard_layout && is_trivially_copyable

This commit is contained in:
Shawn Hoffman 2020-08-21 18:08:16 -07:00
parent 2c2fd21d41
commit c629af6319
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ struct TypedHIDInputData
T data; T data;
static_assert(std::is_pod<T>()); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
u8* GetData() { return reinterpret_cast<u8*>(this); } u8* GetData() { return reinterpret_cast<u8*>(this); }
const u8* GetData() const { return reinterpret_cast<const u8*>(this); } const u8* GetData() const { return reinterpret_cast<const u8*>(this); }

View File

@ -26,7 +26,7 @@ protected:
template <typename T> template <typename T>
static int RawRead(T* reg_data, u8 addr, int count, u8* data_out) static int RawRead(T* reg_data, u8 addr, int count, u8* data_out)
{ {
static_assert(std::is_pod<T>::value); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
static_assert(0x100 == sizeof(T)); static_assert(0x100 == sizeof(T));
// TODO: addr wraps around after 0xff // TODO: addr wraps around after 0xff
@ -42,7 +42,7 @@ protected:
template <typename T> template <typename T>
static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in) static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in)
{ {
static_assert(std::is_pod<T>::value); static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
static_assert(0x100 == sizeof(T)); static_assert(0x100 == sizeof(T));
// TODO: addr wraps around after 0xff // TODO: addr wraps around after 0xff