public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113925] New: static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected
@ 2024-02-14 22:35 gieseanw+gcc at gmail dot com
  2024-02-15  0:10 ` [Bug c++/113925] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: gieseanw+gcc at gmail dot com @ 2024-02-14 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113925
           Summary: static assert on requires clause with non-type bool
                    template instantiated with immediately invoked
                    consteval lambda is incorrectly rejected
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gieseanw+gcc at gmail dot com
  Target Milestone: ---

template<bool B>
struct b{};
static_assert(requires { b<([]()consteval{ return true; }())>{}; });

In gcc 13.2 and 14.0.1 this produces:

error: template argument 1 is invalid
    3 | static_assert(requires { b<([]()consteval{ return true; }())>{}; });
      |                                                     ^

Godbolt: https://godbolt.org/z/7dacc7rKr
StackOverflow: https://stackoverflow.com/a/77996234/27678

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

* [Bug c++/113925] static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected
  2024-02-14 22:35 [Bug c++/113925] New: static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected gieseanw+gcc at gmail dot com
@ 2024-02-15  0:10 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-15  0:10 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-02-15
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. I thought I had saw this before but I can't seem to find it.

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

end of thread, other threads:[~2024-02-15  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 22:35 [Bug c++/113925] New: static assert on requires clause with non-type bool template instantiated with immediately invoked consteval lambda is incorrectly rejected gieseanw+gcc at gmail dot com
2024-02-15  0:10 ` [Bug c++/113925] " pinskia 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).