This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]