Don't fail when no default ctor is given

This commit is contained in:
King_DuckZ 2024-05-24 17:12:22 +02:00
parent 72da0b8d87
commit b00bd59027

View file

@ -76,8 +76,13 @@ namespace wren {
return ConstructResult{1, true};
}
else {
if constexpr (sizeof...(Args) > 0) {
return ForeignClassHelper<T, Args...>::construct(vm, cardinality, memory);
}
else {
return ConstructResult{0, false};
}
}
}
};