Skip to content
Snippets Groups Projects
Commit b06ef2df authored by Robert Maynard's avatar Robert Maynard Committed by Sujin Philip
Browse files

Handle compiling against 4.X versions of libstdc++

This uses a more robust set of checks to determine if
std::is_trivially_copyable exist given the libstdc++ version value
parent 6a79af10
No related branches found
No related tags found
Loading
...@@ -99,8 +99,17 @@ namespace diy ...@@ -99,8 +99,17 @@ namespace diy
template<class T> template<class T>
struct Serialization: public detail::Default struct Serialization: public detail::Default
{ {
#if (defined(__clang__) && !defined(__ppc64__)) || (defined(__GNUC__) && __GNUC__ >= 5) // GCC release date mapping
//exempt power-pc clang variants due to: https://gitlab.kitware.com/vtk/vtk-m/issues/201 // 20160726 == 4.9.4
// 20150626 == 4.9.3
// 20150623 == 4.8.5
// 20150422 == 5.1
// 20141030 == 4.9.2
// See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html#abi.versioning.__GLIBCXX__
#if !(defined(__GLIBCXX__) && \
(__GLIBCXX__ < 20150422 || __GLIBCXX__ == 20160726 || __GLIBCXX__ == 20150626 || \
__GLIBCXX__ == 20150623))
//exempt glibcxx-4 variants as they don't have is_trivially_copyable implemented
static_assert(std::is_trivially_copyable<T>::value, "Default serialization works only for trivially copyable types"); static_assert(std::is_trivially_copyable<T>::value, "Default serialization works only for trivially copyable types");
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment