From 33b5ed85fecda610dbc4f3af9dec079ba0efb57d Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Fri, 5 Sep 2025 10:24:25 +0200 Subject: [PATCH] Remove obsolete workaround for GCC 4.x The fallback implementation was added for GCC 4.x as that didn't yet implement std::is_trivially_copyable. However, by now we're using C++17 as our language standard and that wasn't even implemented in GCC 4.x yet[^1]: Some C++17 features are available since GCC 5, but support was experimental and the ABI of C++17 features was not stable until GCC 9. Hence, this became more or less dead code and can be removed. [^1]: https://gcc.gnu.org/projects/cxx-status.html#cxx17 --- lib/base/atomic.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/base/atomic.hpp b/lib/base/atomic.hpp index 855850336..cb4fe93b0 100644 --- a/lib/base/atomic.hpp +++ b/lib/base/atomic.hpp @@ -71,13 +71,7 @@ private: * @ingroup base */ template -using AtomicOrLocked = -#if defined(__GNUC__) && __GNUC__ < 5 - // GCC does not implement std::is_trivially_copyable until version 5. - typename std::conditional::value || std::is_pointer::value, std::atomic, Locked>::type; -#else /* defined(__GNUC__) && __GNUC__ < 5 */ - typename std::conditional::value, std::atomic, Locked>::type; -#endif /* defined(__GNUC__) && __GNUC__ < 5 */ +using AtomicOrLocked = typename std::conditional::value, std::atomic, Locked>::type; }