mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 19:18:48 +02:00
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
This commit is contained in:
parent
87df80d322
commit
33b5ed85fe
@ -71,13 +71,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 = typename std::conditional<std::is_trivially_copyable<T>::value, std::atomic<T>, Locked<T>>::type;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user