feat(typetraits): add TCommonReference and the corresponding testing

This commit is contained in:
2022-01-11 23:21:05 +08:00
parent 8baaa50335
commit a13b5832fc
2 changed files with 14 additions and 9 deletions

View File

@ -413,6 +413,10 @@ void TestTypeTraits()
always_check((TIsSame<int64, TCommonType<int8, int32, int64>::Type>::Value));
always_check((TIsSame<double, TCommonType<float, double>::Type>::Value));
always_check((TIsSame<int32, TCommonReference<int8, int32>::Type>::Value));
always_check((TIsSame<int64, TCommonReference<int8, int32, int64>::Type>::Value));
always_check((TIsSame<double, TCommonReference<float, double>::Type>::Value));
always_check((TIsSame<int, TUnderlyingType<ETestEnumClass>::Type>::Value));
always_check((TIsSame<uint8, TUnderlyingType<ETestEnumClass8>::Type>::Value));
always_check((TIsSame<uint32, TUnderlyingType<ETestEnumClass32>::Type>::Value));