fix(typetraits): fix CCommonType is incorrect for void

This commit is contained in:
Redstone1024 2024-11-05 22:41:45 +08:00
parent 2a4d65c60e
commit 258aabbde0

View File

@ -182,9 +182,8 @@ concept CCommonReference =
template <typename... Ts>
concept CCommonType =
requires { typename TCommonType<Ts...>; }
&& (true && ... && CConstructibleFrom<TCommonReference<Ts...>, Ts&&>)
&& CCommonReference<const Ts&...> && CCommonReference<TCommonType<Ts...>&, TCommonReference<const Ts&...>>;
requires { typename TCommonType<Ts...>; (static_cast<TCommonType<Ts...>>(DeclVal<Ts>()), ...); }
&& CCommonReference<const TAddLValueReference<Ts>...> && CCommonReference<TCommonReference<TCommonType<Ts...>>, TCommonReference<const TAddLValueReference<Ts>...>>;
NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft)