[Bug c++/92727] Idea for better error messages
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 29 17:22:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92727
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
For this specific call, yes. For the general case of "arguments do not meet the
function's requirements" there are no such notes from the compiler.
For example, v.emplace_back("blah") won't tell you anything more than that you
can't construct an X from "blah".
The bug in this example is that the push_back call needs to make a copy and the
type is not copyable. It's not a bug that the copy constructor is implictly
deleted. Knowing that the copy constructor is implicitly deleted and why,
doesn't actually help you figure out that you need to use std::move.
More information about the Gcc-bugs
mailing list