summaryrefslogtreecommitdiffstats
path: root/src/common/file_util.h
diff options
context:
space:
mode:
authorLittleWhite <lw.demoscene@googlemail.com>2016-04-23 15:45:35 +0200
committerLittleWhite <lw.demoscene@googlemail.com>2016-04-23 15:45:35 +0200
commit9572652ddce1ff51f48829d787ebe33272c6aff6 (patch)
tree66f79b7d5ebc0f0c99190350faa6a028d2fd7897 /src/common/file_util.h
parentMerge pull request #1697 from tfarley/hw-lighting-sync (diff)
downloadyuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar.gz
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar.bz2
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar.lz
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar.xz
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.tar.zst
yuzu-9572652ddce1ff51f48829d787ebe33272c6aff6.zip
Diffstat (limited to '')
-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:
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>(), "Given array does not consist of trivially copyable objects");
+#endif
if (!IsOpen()) {
m_good = false;
@@ -210,7 +212,9 @@ public:
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>(), "Given array does not consist of trivially copyable objects");
+#endif
if (!IsOpen()) {
m_good = false;