[Bug c++/77733] Add fixit hint suggesting to use std::move

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 30 18:27:00 GMT 2016


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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #5)
> IMO the near match is misplaced. What follows the 'candidate:' should be a
> C++ declaration.

Why? Is that a policy or just opinion?

> However, this is not evident from the various "error/notes" and it gets very
> confusing when errors appear within errors. I think it would be better to
> make a rule that a diagnostic is a "error/warning/etc." followed by one or
> more "notes". Thus, the second "error:" should really be a "note:" (why
> 1.8.1 is a note but 1.2.1 is an error?)

1.2.1 is the only viable candidate (the others have the wrong number of
parameters) but can't be called is because trying to bind an lvalue to an
rvalue reference is ill-formed.

Template argument deduction and substitution failures are not errors:
https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error


More information about the Gcc-bugs mailing list