https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106882
Bug ID: 106882 Summary: passing X as 'this' argument discards qualifiers Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- This should be accepted: struct Mutt { operator int*() &&; }; int* five(Mutt x) { return x; // OK since C++20 because P1155 } but is currently rejected with error: passing ‘Mutt’ as ‘this’ argument discards qualifiers [-fpermissive] Maybe we're not checking IMPLICIT_RVALUE_P where needed. This blocks P2266.