perf(templates): add requires on the content of TOptional and TVariant

This commit is contained in:
2022-03-21 18:40:30 +08:00
parent e03cfa956c
commit e0aab7e0b9
2 changed files with 8 additions and 21 deletions

View File

@ -9,7 +9,7 @@ NAMESPACE_REDCRAFT_BEGIN
NAMESPACE_MODULE_BEGIN(Redcraft)
NAMESPACE_MODULE_BEGIN(Utility)
template <typename OptionalType>
template <typename OptionalType> requires (TIsObject<OptionalType>::Value && !TIsArray<OptionalType>::Value&& TIsDestructible<OptionalType>::Value)
struct TOptional
{
public: