In the section 13.6.3 Variadic templates there is written
3 An init-capture pack is a lambda capture that introduces an init-capture for each of the elements in the pack expansion of its initializer
template <typename... Args>
void foo(Args... args) {
[...xs=args]{
bar(xs...); // xs is an init-capture pack
and then
5 A pack expansion consists of a pattern and an ellipsis,...
However we see that in the example above the pack expansion does not use ellipsis. And inside a sizeof... expression there is also ellipsis are not used.
Which pack expansion in this example does not use an ellipsis?
There are two pack expansions here: `...xs=args` where the pattern is `xs=args`, and also in `bar(xs...)`, `xs...` is a pack expansion. Both use an ellipsis.
The `sizeof...` operator also contains an ellipsis. It just happens that the ellipsis is not adjacent to the pack.
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion