mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04: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
a2dc35031c
commit
d372ecc20b
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,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…
Reference in a new issue