refactor(templates): allow some template classes to derive and replace some using with inheritance

This commit is contained in:
2022-11-21 23:28:19 +08:00
parent e35fa9dd11
commit 058f07fedc
9 changed files with 128 additions and 102 deletions

View File

@ -48,7 +48,7 @@ public:
}
template <typename T = OptionalType> requires (CConstructibleFrom<OptionalType, T&&>)
&& (!CSameAs<TRemoveCVRef<T>, FInPlace>) && (!CSameAs<TRemoveCVRef<T>, TOptional>)
&& (!CSameAs<TRemoveCVRef<T>, FInPlace>) && (!CBaseOf<TOptional, TRemoveCVRef<T>>)
constexpr explicit (!CConvertibleTo<T&&, OptionalType>) TOptional(T&& InValue)
: TOptional(InPlace, Forward<T>(InValue))
{ }