Fix build on gcc 4.x

master
Lukas Werling 2018-10-15 21:01:04 +02:00
parent c6d5c5044f
commit 34d89adf47
1 changed files with 3 additions and 0 deletions

View File

@ -227,7 +227,10 @@ inline StdRawAdapt mkRawAdapt(void *pData, size_t iSize, StdCompiler::RawCompile
template <typename T>
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<T>::value, "StdRawAdapt: type must be trivially copyable");
#endif
return mkRawAdapt(&val, sizeof(val));
}