refactor(templates): remove TAtomic::IsLockFree function

This commit is contained in:
_Redstone_c_ 2022-04-22 22:33:23 +08:00
parent 04d713cd93
commit 6b63436d41
2 changed files with 0 additions and 5 deletions

View File

@ -1248,7 +1248,6 @@ void TestAtomic()
TAtomic<int32> TempA;
always_check(TempA.bIsAlwaysLockFree);
always_check(TempA.IsLockFree());
always_check((TempA = 11) == 11);
TempA.Store(12);
always_check(TempA.Load() == 12);
@ -1291,7 +1290,6 @@ void TestAtomic()
TAtomicRef<int32> TempA(A);
always_check(TempA.bIsAlwaysLockFree);
always_check(TempA.IsLockFree());
always_check((TempA = 11) == 11);
TempA.Store(12);
always_check(TempA.Load() == 12);

View File

@ -77,9 +77,6 @@ public:
FORCEINLINE ValueType operator=(ValueType Desired) { return Element = Desired; }
FORCEINLINE ValueType operator=(ValueType Desired) volatile requires bIsAlwaysLockFree { return Element = Desired; }
FORCEINLINE bool IsLockFree() const { return Element.is_lock_free(); }
FORCEINLINE bool IsLockFree() const volatile { return Element.is_lock_free(); }
FORCEINLINE void Store(ValueType Desired, EMemoryOrder Order = EMemoryOrder::SequentiallyConsistent) { MEMORY_ORDER_CHECK(Order, 0x01 | 0x08 | 0x20); Element.store(Desired, static_cast<NAMESPACE_STD::memory_order>(Order)); }
FORCEINLINE void Store(ValueType Desired, EMemoryOrder Order = EMemoryOrder::SequentiallyConsistent) volatile requires bIsAlwaysLockFree { MEMORY_ORDER_CHECK(Order, 0x01 | 0x08 | 0x20); Element.store(Desired, static_cast<NAMESPACE_STD::memory_order>(Order)); }