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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Could be improved to:
> ```
> <source>:12:14: error: no match for 'operator=' (Hint: type of lhs is
> const-qualified) (operand types are 'const std::string' {aka 'const
> std::__cxx11::basic_string<char>'} and 'std::string' {aka
> 'std::__cxx11::basic_string<char>'})
>    12 |     test.a = oops;
>       |              ^~~~


"lhs" doesn't belong in a diagnostic, it's not a defined term. Maybe "left
operand".

We also don't generally nest a hint inside another error like that, it should
be a note on a following line.

Reply via email to