Don't fail when no default ctor is given
This commit is contained in:
parent
72da0b8d87
commit
b00bd59027
1 changed files with 6 additions and 1 deletions
|
@ -76,7 +76,12 @@ namespace wren {
|
||||||
return ConstructResult{1, true};
|
return ConstructResult{1, true};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return ForeignClassHelper<T, Args...>::construct(vm, cardinality, memory);
|
if constexpr (sizeof...(Args) > 0) {
|
||||||
|
return ForeignClassHelper<T, Args...>::construct(vm, cardinality, memory);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return ConstructResult{0, false};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue