1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Allow custom parameters to array element generator.

This commit is contained in:
Sandu Liviu Catalin 2020-04-17 19:01:20 +03:00
parent e13d1a91e7
commit f1654969b8

View File

@ -537,10 +537,10 @@ public:
/// \return The Array itself so the call can be chained
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class F>
ArrayBase& AppendFrom(F&& func) {
template<class F, class... A>
ArrayBase& AppendFrom(F&& func, A &&... a) {
sq_pushobject(vm, GetObj());
while (func(vm))
while (func(vm, std::forward< A >(a)...))
{
sq_arrayappend(vm, -2);
}