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

            Bug ID: 99732
           Summary: gcc accepts overload a member function without
                    ref-qualifier with a member function with a
                    ref-qualifier
           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: ---

struct S {
  constexpr auto f(auto...) &&            { return false; }
  constexpr auto f(auto...) requires true { return true;  }
};

static_assert(S{}.f());

gcc accepts this code.

https://godbolt.org/z/7rdWEsrfv

Reply via email to