Merge pull request #10552 from Icinga/remove-obsolete-gcc-workaround

Remove workaround for GCC 4.x
This commit is contained in:
Julian Brost 2025-10-17 12:17:14 +02:00 committed by GitHub
commit 82cd88f093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,13 +109,7 @@ private:
* @ingroup base
*/
template <typename T>
using AtomicOrLocked =
#if defined(__GNUC__) && __GNUC__ < 5
// GCC does not implement std::is_trivially_copyable until version 5.
typename std::conditional<std::is_fundamental<T>::value || std::is_pointer<T>::value, std::atomic<T>, Locked<T>>::type;
#else /* defined(__GNUC__) && __GNUC__ < 5 */
typename std::conditional<std::is_trivially_copyable<T>::value, std::atomic<T>, Locked<T>>::type;
#endif /* defined(__GNUC__) && __GNUC__ < 5 */
using AtomicOrLocked = std::conditional_t<std::is_trivially_copyable_v<T>, std::atomic<T>, Locked<T>>;
}