Пример приведен из выражений сгиба в C ++ здесь: < /p>
#include
#include
#include
template
void
multi_insert(T &t, E&&...e)
{
// unary right fold over comma
(void(t.insert(std::forward(e))), ...); // what's the point of void()?
}
int
main()
{
std::set s;
multi_insert(s, 1, 4, 7, 10);
for (auto i : s)
std::cout
Подробнее здесь: https://stackoverflow.com/questions/794 ... expression