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)); }