[Bug c++/99546] New: Weird return value of C++20 requires expression

hewillk at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 11 08:49:19 GMT 2021


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

            Bug ID: 99546
           Summary: Weird return value of C++20 requires expression
           Product: gcc
           Version: 11.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-trunk accepts following code:

int main() {
  constexpr auto b = requires { []{}; };
  static_assert(b);
  static_assert(!b);
}

(godbolt: https://godbolt.org/z/4K5vq8)


More information about the Gcc-bugs mailing list