public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107113] New: In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before
@ 2022-10-01 17:19 iamsupermouse at mail dot ru
2022-10-01 21:01 ` [Bug c++/107113] " redi at gcc dot gnu.org
2022-10-02 4:35 ` iamsupermouse at mail dot ru
0 siblings, 2 replies; 3+ messages in thread
From: iamsupermouse at mail dot ru @ 2022-10-01 17:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107113
Bug ID: 107113
Summary: In function parameter list, `...` expanding a pack is
accepted after `()` of a parameter declarator, but not
before
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: iamsupermouse at mail dot ru
Target Milestone: ---
GCC rejects this code:
template <typename ...P>
struct A
{
void Foo(P...());
};
A<int, int> a;
But accepts this:
template <typename ...P>
struct A
{
void Foo(P()...);
};
A<int, int> a;
Only the first snippet should compile, since `...` must be located immediately
before a parameter name (or a place where it would otherwise be located), as
commonly seen in cases like `X &&... x`.
Clang only accepts the first snippet.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107113] In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before
2022-10-01 17:19 [Bug c++/107113] New: In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before iamsupermouse at mail dot ru
@ 2022-10-01 21:01 ` redi at gcc dot gnu.org
2022-10-02 4:35 ` iamsupermouse at mail dot ru
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-01 21:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107113
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Is this Bug 107111?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107113] In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before
2022-10-01 17:19 [Bug c++/107113] New: In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before iamsupermouse at mail dot ru
2022-10-01 21:01 ` [Bug c++/107113] " redi at gcc dot gnu.org
@ 2022-10-02 4:35 ` iamsupermouse at mail dot ru
1 sibling, 0 replies; 3+ messages in thread
From: iamsupermouse at mail dot ru @ 2022-10-02 4:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107113
Egor <iamsupermouse at mail dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Egor <iamsupermouse at mail dot ru> ---
Yep.
*** This bug has been marked as a duplicate of bug 107111 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-02 4:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 17:19 [Bug c++/107113] New: In function parameter list, `...` expanding a pack is accepted after `()` of a parameter declarator, but not before iamsupermouse at mail dot ru
2022-10-01 21:01 ` [Bug c++/107113] " redi at gcc dot gnu.org
2022-10-02 4:35 ` iamsupermouse at mail dot ru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).