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 33b5ed85fe
commit 8df52ed8c1

View File

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