From 34d89adf473a952cc4ca684a3af4ac5bfd4efb1d Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Mon, 15 Oct 2018 21:01:04 +0200 Subject: [PATCH] Fix build on gcc 4.x --- src/lib/StdAdaptors.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/StdAdaptors.h b/src/lib/StdAdaptors.h index c458faa2f..eea14d90f 100644 --- a/src/lib/StdAdaptors.h +++ b/src/lib/StdAdaptors.h @@ -227,7 +227,10 @@ inline StdRawAdapt mkRawAdapt(void *pData, size_t iSize, StdCompiler::RawCompile template inline StdRawAdapt mkRawAdaptM(T &val) { + // GCC 4.x doesn't support std::is_trivially_copyable +#if !defined(__GNUC__) || __GNUC__ > 4 static_assert(std::is_trivially_copyable::value, "StdRawAdapt: type must be trivially copyable"); +#endif return mkRawAdapt(&val, sizeof(val)); }