Skip to content

Commit

Permalink
Fix build on gcc 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lluchs committed Oct 15, 2018
1 parent c6d5c50 commit 34d89ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/StdAdaptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 34d89ad

Please sign in to comment.