C++ Logo

std-discussion

Advanced search

Contradiction in the description of the pack expansion

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Fri, 16 Aug 2019 17:05:29 +0300
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.

So in my opinion the paragraph 5 can be rewritten. Otherwise it confuses readers.

With best regards,
(Vlad from Moscow)

You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

Received on 2019-08-16 09:07:35