summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2016-04-23 10:57:13 -0400
committerGravatar bunnei2016-04-23 10:57:13 -0400
commit4c9ed98084e50d093399db03bada1906d06cd765 (patch)
tree66f79b7d5ebc0f0c99190350faa6a028d2fd7897 /src/common
parentMerge pull request #1697 from tfarley/hw-lighting-sync (diff)
parentProtect use of std::is_trivially_copyable to compile with GCC 4.9 (diff)
downloadyuzu-4c9ed98084e50d093399db03bada1906d06cd765.tar.gz
yuzu-4c9ed98084e50d093399db03bada1906d06cd765.tar.xz
yuzu-4c9ed98084e50d093399db03bada1906d06cd765.zip
Merge pull request #1705 from LittleWhite-tb/compat_gcc49
Protect use of std::is_trivially_copyable to compile with GCC 4.9
Diffstat (limited to 'src/common')
-rw-r--r--src/common/file_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index b54a9fb72..3aac4fa46 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -192,7 +192,9 @@ public:
192 size_t ReadArray(T* data, size_t length) 192 size_t ReadArray(T* data, size_t length)
193 { 193 {
194 static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); 194 static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects");
195#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER)
195 static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); 196 static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects");
197#endif
196 198
197 if (!IsOpen()) { 199 if (!IsOpen()) {
198 m_good = false; 200 m_good = false;
@@ -210,7 +212,9 @@ public:
210 size_t WriteArray(const T* data, size_t length) 212 size_t WriteArray(const T* data, size_t length)
211 { 213 {
212 static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects"); 214 static_assert(std::is_standard_layout<T>(), "Given array does not consist of standard layout objects");
215#if (__GNUC__ >= 5) || defined(__clang__) || defined(_MSC_VER)
213 static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects"); 216 static_assert(std::is_trivially_copyable<T>(), "Given array does not consist of trivially copyable objects");
217#endif
214 218
215 if (!IsOpen()) { 219 if (!IsOpen()) {
216 m_good = false; 220 m_good = false;