template<typename T> inline static void toVal(Val& mV, T&& mX) { Arr result; result.reserve(sizeof...(TArgs)); // TODO: fwd macro? tplFor([&result](auto&& mI){ result.emplace_back(fwd<decltype(mI)>(mI)); }, fwd<T>(mX)); mV.setArr(std::move(result)); }
template<typename T> inline static void toVal(Val& mV, T&& mX) { mV.setArr(Arr { Val{moveIfRValue<decltype(mX)>(mX.first)}, Val{moveIfRValue<decltype(mX)>(mX.second)} }); }
template<typename T> inline static void toVal(Val& mV, T&& mX) { Arr result; result.reserve(TS); for(auto i(0u); i < TS; ++i) result.emplace_back(moveIfRValue<decltype(mX)>(mX[i])); mV.setArr(std::move(result)); }
template<typename T> inline static void toVal(Val& mV, T&& mX) { Arr result; result.reserve(mX.size()); for(const auto& v : mX) result.emplace_back(moveIfRValue<decltype(mX)>(v)); mV.setArr(std::move(result)); }
template<typename T> inline static void toVal(Val& mV, T&& mX) { Arr result; result.reserve(sizeof...(TArgs)); TplCnvHelper::fromTpl<0, TArgs...>(result, fwd<T>(mX)); mV.setArr(std::move(result)); }