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:
Julian Brost 2025-09-05 10:34:45 +02:00
parent a2dc35031c
commit d372ecc20b

View file

@ -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>>;
}