public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda
@ 2023-05-08 21:35 eric.niebler at gmail dot com
  2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: eric.niebler at gmail dot com @ 2023-05-08 21:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109781
           Summary: erroneous error "lambda-expression in template
                    parameter type" for tparam lambda returning a lambda
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

template <auto A = []{ return []{}; }>
struct C {};


... on trunk with `-std=c++20` results in:

<source>: In lambda function:
<source>:1:31: error: lambda-expression in template parameter type
    1 | template <auto A = []{ return []{}; }>
      |                               ^
Compiler returned: 1


I don't know of a reason why this code should be rejected.

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

end of thread, other threads:[~2024-01-12 11:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com
2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org
2023-05-16 12:17 ` [Bug c++/109781] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org
2023-05-29 10:08 ` jakub at gcc dot gnu.org
2023-10-28 15:00 ` johelegp at gmail dot com
2023-10-28 15:01 ` johelegp at gmail dot com
2024-01-12 11:03 ` rguenth 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).