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

            Bug ID: 102915
           Summary: GCC allows a trailing requires clause on a non
                    templated 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: ---

The following code should not be accepted, please correct me if I am wrong.

template<class = void>
auto l = []() requires true {};

int main() { l<>(); }

https://godbolt.org/z/h8ndYs3x8

Reply via email to