0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 04:38:52 +02:00

ircd:🆑 Simplify parameter pack w/ fold expression; thanks @jonesmz

This commit is contained in:
Jason Volk 2021-08-08 08:12:19 -07:00
parent 8d443ebeb5
commit 49fb5b13a2

View file

@ -276,18 +276,8 @@ ircd::cl::kern::kern(code &c,
argv&&... a) argv&&... a)
:kern{c, name} :kern{c, name}
{ {
constexpr uint argc uint i(0);
{ (this->arg(i++, a), ...);
sizeof...(a)
};
data *const datas[argc]
{
std::addressof(a)...
};
for(uint i(0); i < argc; ++i)
this->arg(i, *datas[i]);
} }
template<class T> template<class T>