https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122259
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #7 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Jonny Grant from comment #6)
> Where it says "no match for 'operator='" given there can never be a valid
> operator= for a const object - can the text be clear on that point?
There is nothing preventing operator= from having a const qualifier:
struct S { void operator=(int) const {} };
const S s;
int main() { s = 3; }
But maybe your suggestion would be useful if it is limited to types that do not
have any const-qualified operator=, which is going to be the vast majority of
them.