feat(templates): add TVariant and the corresponding testing

This commit is contained in:
2022-03-15 19:26:31 +08:00
parent 8188d29a58
commit d8ae39b980
6 changed files with 706 additions and 4 deletions

View File

@ -26,10 +26,6 @@ template <typename T>
constexpr typename TRemoveReference<T>::Type&& MoveTemp(T&& Obj)
{
typedef typename TRemoveReference<T>::Type CastType;
static_assert(TIsLValueReference<T>::Value, "MoveTemp called on an rvalue.");
static_assert(!TIsConst<CastType>::Value, "MoveTemp called on a const object.");
return (CastType&&)Obj;
}