public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103428] New: Parameter packs not expanded with local struct in lambda
@ 2021-11-25 13:58 hewillk at gmail dot com
  2021-11-25 17:27 ` [Bug c++/103428] [11/12 Regression] " jakub at gcc dot gnu.org
  2022-03-27  0:18 ` jason at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2021-11-25 13:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103428

            Bug ID: 103428
           Summary: Parameter packs not expanded with local struct in
                    lambda
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

gcc-10 rejects this well-formed code. 
Fortunately, gcc-11.1 accepts it, however, gcc-11.2 rejected it again.

template<class... Ts>
auto f(Ts... args) {
  ([]() { struct B : decltype(args) { }; }, ...);
};

int main() {
  f([]{});
}

https://godbolt.org/z/rYhnKee7M

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/103428] [11/12 Regression] Parameter packs not expanded with local struct in lambda
  2021-11-25 13:58 [Bug c++/103428] New: Parameter packs not expanded with local struct in lambda hewillk at gmail dot com
@ 2021-11-25 17:27 ` jakub at gcc dot gnu.org
  2022-03-27  0:18 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-25 17:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103428

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Parameter packs not         |[11/12 Regression]
                   |expanded with local struct  |Parameter packs not
                   |in lambda                   |expanded with local struct
                   |                            |in lambda
   Last reconfirmed|                            |2021-11-25
   Target Milestone|---                         |11.3
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started to be rejected again with
r12-392-g2a6fc19e655e696bf0df9b7aaedf9848b23f07f3
11.1 accepts it since
r11-8103-ge89055f90cff9fb6f565b9374e1ab74f805682fb

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/103428] [11/12 Regression] Parameter packs not expanded with local struct in lambda
  2021-11-25 13:58 [Bug c++/103428] New: Parameter packs not expanded with local struct in lambda hewillk at gmail dot com
  2021-11-25 17:27 ` [Bug c++/103428] [11/12 Regression] " jakub at gcc dot gnu.org
@ 2022-03-27  0:18 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-27  0:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103428

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Local classes in lambdas in pack expansions that depend on parameter packs have
never worked properly; giving an error is better than accepting it and doing
the wrong thing.

*** This bug has been marked as a duplicate of bug 100282 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-27  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 13:58 [Bug c++/103428] New: Parameter packs not expanded with local struct in lambda hewillk at gmail dot com
2021-11-25 17:27 ` [Bug c++/103428] [11/12 Regression] " jakub at gcc dot gnu.org
2022-03-27  0:18 ` jason at gcc dot gnu.org

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).