Merge pull request #414 from lioncash/cruft

file_util: Remove compiler version checks around is_trivially_copyable
This commit is contained in:
bunnei 2018-04-28 17:06:49 -04:00 committed by GitHub
commit 3d9126ba87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 8 deletions

View File

@ -170,12 +170,8 @@ public:
template <typename T> template <typename T>
size_t ReadArray(T* data, size_t length) { size_t ReadArray(T* data, size_t length) {
static_assert(std::is_standard_layout<T>(),
"Given array does not consist of standard layout objects");
#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER)
static_assert(std::is_trivially_copyable<T>(), static_assert(std::is_trivially_copyable<T>(),
"Given array does not consist of trivially copyable objects"); "Given array does not consist of trivially copyable objects");
#endif
if (!IsOpen()) { if (!IsOpen()) {
m_good = false; m_good = false;
@ -191,12 +187,8 @@ public:
template <typename T> template <typename T>
size_t WriteArray(const T* data, size_t length) { size_t WriteArray(const T* data, size_t length) {
static_assert(std::is_standard_layout<T>(),
"Given array does not consist of standard layout objects");
#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER)
static_assert(std::is_trivially_copyable<T>(), static_assert(std::is_trivially_copyable<T>(),
"Given array does not consist of trivially copyable objects"); "Given array does not consist of trivially copyable objects");
#endif
if (!IsOpen()) { if (!IsOpen()) {
m_good = false; m_good = false;