mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd:🆑 Simplify parameter pack w/ fold expression; thanks @jonesmz
This commit is contained in:
parent
8d443ebeb5
commit
49fb5b13a2
1 changed files with 2 additions and 12 deletions
|
@ -276,18 +276,8 @@ ircd::cl::kern::kern(code &c,
|
|||
argv&&... a)
|
||||
:kern{c, name}
|
||||
{
|
||||
constexpr uint argc
|
||||
{
|
||||
sizeof...(a)
|
||||
};
|
||||
|
||||
data *const datas[argc]
|
||||
{
|
||||
std::addressof(a)...
|
||||
};
|
||||
|
||||
for(uint i(0); i < argc; ++i)
|
||||
this->arg(i, *datas[i]);
|
||||
uint i(0);
|
||||
(this->arg(i++, a), ...);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
|
Loading…
Reference in a new issue