refactor(typetraits): simplifies concept selection and removes the concept of bitwise operations

This commit is contained in:
2022-05-21 22:39:22 +08:00
parent ee46d84897
commit 97910be70c
14 changed files with 93 additions and 263 deletions

View File

@ -152,7 +152,6 @@ struct FTracker
~FTracker() { always_check(Status == 3); Status = -1; }
FTracker& operator=(const FTracker&) { always_check(Status == 4); Status = -1; return *this; }
FTracker& operator=(FTracker&&) { always_check(Status == 5); Status = -1; return *this; }
friend bool operator==(const FTracker&, const FTracker&) { always_check(Status == 6); Status = -1; return true; }
};
int32 FTracker::Status = -1;
@ -181,10 +180,6 @@ void TestMemoryOperator()
Memory::MoveConstruct(PtrA, PtrB);
always_check(FTracker::Status == -1);
FTracker::Status = -1;
Memory::RelocateConstruct(PtrA, PtrB);
always_check(FTracker::Status == -1);
FTracker::Status = 3;
Memory::Destruct(PtrA);
always_check(FTracker::Status == -1);
@ -197,11 +192,6 @@ void TestMemoryOperator()
Memory::MoveAssign(PtrA, PtrB);
always_check(FTracker::Status == -1);
FTracker::Status = 6;
const bool bResult = Memory::Compare(PtrA, PtrB);
always_check(bResult);
always_check(FTracker::Status == -1);
Memory::Free(PtrA);
Memory::Free(PtrB);
}