refactor(*): replaces template class type traits with C++20 at all

This commit is contained in:
2022-06-16 23:37:29 +08:00
parent 8e31a82a1f
commit f1d4d99ecf
11 changed files with 438 additions and 362 deletions

View File

@ -124,7 +124,8 @@ public:
return *this;
}
template <typename T = OptionalType> requires CConstructibleFrom<OptionalType, const T&> && CAssignableFrom<OptionalType&, const T&> && TAllowUnwrapping<T>::Value
template <typename T = OptionalType> requires CConstructibleFrom<OptionalType, const T&>
&& CAssignableFrom<OptionalType&, const T&> && TAllowUnwrapping<T>::Value
constexpr TOptional& operator=(const TOptional<T>& InValue)
{
if (!InValue.IsValid())
@ -143,7 +144,8 @@ public:
return *this;
}
template <typename T = OptionalType> requires CConstructibleFrom<OptionalType, T&&> && CAssignableFrom<OptionalType&, T&&> && TAllowUnwrapping<T>::Value
template <typename T = OptionalType> requires CConstructibleFrom<OptionalType, T&&>
&& CAssignableFrom<OptionalType&, T&&> && TAllowUnwrapping<T>::Value
constexpr TOptional& operator=(TOptional<T>&& InValue)
{
if (!InValue.IsValid())