From 5d9ee12b1a175b14e35f620e7657a424c5842d80 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 28 Apr 2018 15:24:41 -0400 Subject: file_util: Remove compiler version checks around is_trivially_copyable() The minimum clang/GCC versions we support already support this. We can also remove is_standard_layout(), as fread and fwrite only require the type to be trivially copyable. --- src/common/file_util.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/common/file_util.h') diff --git a/src/common/file_util.h b/src/common/file_util.h index 143f099eb..4c11849ee 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -170,12 +170,8 @@ public: template size_t ReadArray(T* data, size_t length) { - static_assert(std::is_standard_layout(), - "Given array does not consist of standard layout objects"); -#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER) static_assert(std::is_trivially_copyable(), "Given array does not consist of trivially copyable objects"); -#endif if (!IsOpen()) { m_good = false; @@ -191,12 +187,8 @@ public: template size_t WriteArray(const T* data, size_t length) { - static_assert(std::is_standard_layout(), - "Given array does not consist of standard layout objects"); -#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER) static_assert(std::is_trivially_copyable(), "Given array does not consist of trivially copyable objects"); -#endif if (!IsOpen()) { m_good = false; -- cgit v1.2.3