From: Wolfgang Bangerth Date: Fri, 18 Dec 2020 22:34:58 +0000 (-0700) Subject: Remove compatibility code for GCC versions prior to 5.x. X-Git-Tag: v9.3.0-rc1~735^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1106edd3b25e36b33fb01c59678ca8623d15b9cf;p=dealii.git Remove compatibility code for GCC versions prior to 5.x. We no longer support these compilers, so we can just remove the code without replacement. --- diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index bd88309c75..c0046ae2d1 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -1188,18 +1188,10 @@ namespace Utilities // see if the object is small and copyable via memcpy. if so, use // this fast path. otherwise, we have to go through the BOOST // serialization machinery - // - // we have to work around the fact that GCC 4.8.x claims to be C++ - // conforming, but is not actually as it does not implement - // std::is_trivially_copyable. -#if __GNUG__ && __GNUC__ < 5 - if (__has_trivial_copy(T) && sizeof(T) < 256) -#else -# ifdef DEAL_II_HAVE_CXX17 +#ifdef DEAL_II_HAVE_CXX17 if constexpr (std::is_trivially_copyable() && sizeof(T) < 256) -# else +#else if (std::is_trivially_copyable() && sizeof(T) < 256) -# endif #endif { const std::size_t previous_size = dest_buffer.size(); @@ -1257,18 +1249,10 @@ namespace Utilities // see if the object is small and copyable via memcpy. if so, use // this fast path. otherwise, we have to go through the BOOST // serialization machinery - // - // we have to work around the fact that GCC 4.8.x claims to be C++ - // conforming, but is not actually as it does not implement - // std::is_trivially_copyable. -#if __GNUG__ && __GNUC__ < 5 - if (__has_trivial_copy(T) && sizeof(T) < 256) -#else -# ifdef DEAL_II_HAVE_CXX17 +#ifdef DEAL_II_HAVE_CXX17 if constexpr (std::is_trivially_copyable() && sizeof(T) < 256) -# else +#else if (std::is_trivially_copyable() && sizeof(T) < 256) -# endif #endif { Assert(std::distance(cbegin, cend) == sizeof(T), ExcInternalError()); @@ -1312,17 +1296,7 @@ namespace Utilities // see if the object is small and copyable via memcpy. if so, use // this fast path. otherwise, we have to go through the BOOST // serialization machinery - // - // we have to work around the fact that GCC 4.8.x claims to be C++ - // conforming, but is not actually as it does not implement - // std::is_trivially_copyable. - if ( -#if __GNUG__ && __GNUC__ < 5 - __has_trivial_copy(T) -#else - std::is_trivially_copyable() -#endif - && sizeof(T) * N < 256) + if (std::is_trivially_copyable() && sizeof(T) * N < 256) { Assert(std::distance(cbegin, cend) == sizeof(T) * N, ExcInternalError());