mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 11:08:51 +02:00
AtomicOrLocked: use std::conditional_t and std::is_trivially_copyable_v
std::conditional_t was added in C++14, is_trivially_copyable_v in C++17, both do the same as the previous implementation and are a bit more compact.
This commit is contained in:
parent
33b5ed85fe
commit
8df52ed8c1
@ -71,7 +71,7 @@ private:
|
||||
* @ingroup base
|
||||
*/
|
||||
template <typename T>
|
||||
using AtomicOrLocked = typename std::conditional<std::is_trivially_copyable<T>::value, std::atomic<T>, Locked<T>>::type;
|
||||
using AtomicOrLocked = std::conditional_t<std::is_trivially_copyable_v<T>, std::atomic<T>, Locked<T>>;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user